1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417 |
- <style>
- #table_time_selected1 tr {
- border: 1px solid rgb(102, 162, 243);
- }
- .plug-timer-grid th {
- line-height: 25px;
- }
- .module-form .ant-form-item-required::before {
- display: inline-block;
- margin-right: 4px;
- color: #f5222d;
- font-size: 14px;
- font-family: SimSun, sans-serif;
- line-height: 1;
- content: '';
- }
- .else-label .ant-form-item-label label::after {
- content: '';
- position: relative;
- top: -0.5px;
- margin: 0 8px 0 2px;
- }
- </style>
- <style scoped>
- ul {
- padding-left: 0;
- }
- li {
- list-style: none;
- }
- li:hover {
- background: #f2f2f2;
- }
- </style>
- <template>
- <a-form :form="formAll" class="module-form" @submit="handleSubmit" :hideRequiredMark="true">
- <a-form-item
- label="地区"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
- >
- <a-radio-group @change="regionChange" v-model="allForm.regionType" buttonStyle="solid">
- <a-radio-button value="noLimit">不限</a-radio-button>
- <a-radio-button value="limit">指定地区</a-radio-button>
- </a-radio-group>
- <div v-if="allForm.regionType == 'limit'" style="margin-top: 10px">
- <select-region :checkData.sync="allForm.region" :dataValue="allForm.region" />
- </div>
- </a-form-item>
- <a-form-item
- label="年龄"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
- >
- <a-radio-group v-model="allForm.ageType" buttonStyle="solid">
- <a-radio-button value="noLimit">不限</a-radio-button>
- <a-radio-button value="ageLimit">限定年龄段</a-radio-button>
- <a-radio-button value="ageCustom">自定义年龄段</a-radio-button>
- </a-radio-group>
- <div v-if="allForm.ageType == 'ageLimit'" style="margin-top: 5px">
- <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="18">18-23岁</a-checkbox>
- <a-checkbox :value="24">24-30岁</a-checkbox>
- <a-checkbox :value="31">31-40岁</a-checkbox>
- <a-checkbox :value="41">41-49岁</a-checkbox>
- <a-checkbox :value="50">50+</a-checkbox>
- </a-checkbox-group>
- </div>
- <div v-if="allForm.ageType == 'ageCustom'">
- <a-slider
- range
- :marks="marks"
- :min="5"
- :max="55"
- v-decorator="[
- 'age',
- {
- rules: [{ required: true, message: '请选择年龄段' }, { validator: handleConfirmValue }],
- initialValue: [10, 50],
- },
- ]"
- />
- </div>
- </a-form-item>
- <a-form-item
- label="性别"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
- >
- <a-radio-group
- buttonStyle="solid"
- v-decorator="[
- 'gender',
- {
- initialValue: 0,
- },
- ]"
- >
- <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>
- </a-form-item>
- <a-form-item
- label="行为意向"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- >
- <a-radio-group buttonStyle="solid" v-model="allForm.behaviorInterest">
- <a-radio-button value="0">不限</a-radio-button>
- <a-radio-button value="1">自定义</a-radio-button>
- </a-radio-group>
- <br />
- 行为意向旨在帮助广告主精准定向用户
- </a-form-item>
- <a-form-item
- label="行为场景"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- class="else-label"
- v-if="allForm.behaviorInterest === '1'"
- >
- <a-select
- mode="multiple"
- style="width: 100%"
- optionFilterProp="children"
- showSearch
- :filterOption="filterOption"
- v-decorator="[
- 'sceneType',
- { rules: [{ required: true, message: '请选择行为场景' }], initialValue: [1, 2, 4] },
- ]"
- >
- <a-select-option :value="1">社区</a-select-option>
- <a-select-option :value="2">APP</a-select-option>
- <a-select-option :value="4">推广</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item
- label=" "
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- class="else-label"
- v-if="allForm.behaviorInterest === '1'"
- >
- 在
- <a-select
- style="width: 30%"
- optionFilterProp="children"
- showSearch
- :filterOption="filterOption"
- v-decorator="['timeType', { rules: [{ required: true, message: '请选择行为场景' }], initialValue: 4 }]"
- >
- <a-select-option :value="0">7天</a-select-option>
- <a-select-option :value="1">15天</a-select-option>
- <a-select-option :value="2">30天</a-select-option>
- <a-select-option :value="3">90天</a-select-option>
- <a-select-option :value="4">180天</a-select-option>
- </a-select>
- 天内发生行为的用户
- </a-form-item>
- <a-form-item
- label="行为强度"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="allForm.behaviorInterest === '1'"
- >
- <a-radio-group
- buttonStyle="solid"
- v-decorator="['strengthType', { rules: [{ required: true, message: '行为强度必选' }], initialValue: 0 }]"
- >
- <a-radio-button :value="0">不限</a-radio-button>
- <a-radio-button :value="1">高强度</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- label="行为定向选择"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="allForm.behaviorInterest === '1'"
- >
- <el-cascader
- style="width:100%"
- :options="behaviorData"
- @change="getAllData"
- :props="{ multiple: true,value:'id',label:'name',emitPath:false }"
- v-decorator="['behavior', { rules: [{ required: true, message: '行为意向必选' }]}]"
- collapse-tags
- clearable></el-cascader>
- </a-form-item>
-
- <a-form-item
- label="意向定向选择"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="allForm.behaviorInterest === '1'"
- >
- <el-cascader
- style="width:100%"
- :options="interestData"
- @change="getAllData"
- :props="{ multiple: true,value:'id',label:'name',emitPath:false }"
- v-decorator="['interest']"
- collapse-tags
- clearable></el-cascader>
- </a-form-item>
- <a-form-item
- label="最低版本"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- >
- <a-radio-group buttonStyle="solid" v-model="allForm.platform_os">
- <a-radio-button :value="0" v-if="getApp == '0'">不限</a-radio-button>
- <a-radio-button :value="1" v-if="getApp == '0' || getApp == '1'">Android系统</a-radio-button>
- <a-radio-button :value="2" v-if="getApp == '0' || getApp == '2'">IOS系统</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- label=" "
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="allForm.platform_os == 1"
- class="else-label"
- style="margin-top: -16px"
- >
- <a-radio-group
- v-decorator="[
- 'androidOsv',
- {
- initialValue: 3,
- },
- ]"
- >
- <a-radio :value="3">不限</a-radio>
- <a-radio :value="4">4X+</a-radio>
- <a-radio :value="5">5x+</a-radio>
- <a-radio :value="6">6x+</a-radio>
- <a-radio :value="7">7x+</a-radio>
- <a-radio :value="8">8x+</a-radio>
- <a-radio :value="9">9x+</a-radio>
- <a-radio :value="10">10x+</a-radio>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- label=" "
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="allForm.platform_os == 2"
- class="else-label"
- style="margin-top: -16px"
- >
- <a-radio-group
- v-decorator="[
- 'iosOsv',
- {
- initialValue: 6,
- },
- ]"
- >
- <a-radio :value="6">不限</a-radio>
- <a-radio :value="7">7X+</a-radio>
- <a-radio :value="8">8x+</a-radio>
- <a-radio :value="9">9x+</a-radio>
- <a-radio :value="10">10x+</a-radio>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- v-if="allForm.platform_os != 2"
- label="设备品牌"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- >
- <a-radio-group buttonStyle="solid" v-model="allForm.device">
- <a-radio-button value="0">不限</a-radio-button>
- <a-radio-button value="1">选择品牌</a-radio-button>
- </a-radio-group>
- <div v-if="allForm.device == '1'" style="width: 120%; margin-top: 15px">
- <a-checkbox-group
- v-decorator="['deviceBrand', { rules: [{ required: true, message: '请选择设备品牌' }] }]"
- style="width: 120%"
- >
- <a-checkbox :value="1" style="margin-bottom: 8px">OPPO</a-checkbox>
- <a-checkbox :value="2" style="margin-bottom: 8px">VIVO</a-checkbox>
- <a-checkbox :value="3" style="margin-bottom: 8px">华为</a-checkbox>
- <a-checkbox :value="4" style="margin-bottom: 8px">小米</a-checkbox>
- <a-checkbox :value="5" style="margin-bottom: 8px">荣耀</a-checkbox>
- <a-checkbox :value="6" style="margin-bottom: 8px">三星</a-checkbox>
- <a-checkbox :value="7" style="margin-bottom: 8px">金立</a-checkbox>
- <a-checkbox :value="8" style="margin: 0 0 8px 0">魅族</a-checkbox>
- <a-checkbox :value="9" style="margin-bottom: 8px">乐视</a-checkbox>
- <a-checkbox :value="10" style="margin-bottom: 8px">其他</a-checkbox>
- <a-checkbox :value="11" v-if="allForm.platform_os == 0" style="margin-bottom: 8px">苹果</a-checkbox>
- </a-checkbox-group>
- </div>
- </a-form-item>
- <a-form-item
- label="设备价格"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- >
- <a-radio-group buttonStyle="solid" v-model="allForm.price">
- <a-radio-button value="0">不限</a-radio-button>
- <a-radio-button value="1">选择价格</a-radio-button>
- </a-radio-group>
- <div v-if="allForm.price == '1'" style="width: 120%; margin-top: 10px">
- <a-checkbox-group
- v-decorator="['devicePrice', { rules: [{ required: true, message: '请选择设备价格' }] }]"
- style="width: 120%"
- >
- <a-checkbox :value="1" style="margin-bottom: 8px">1500以下</a-checkbox>
- <a-checkbox :value="2" style="margin-bottom: 8px">1501~2000</a-checkbox>
- <a-checkbox :value="3" style="margin-bottom: 8px">2001~2500</a-checkbox>
- <a-checkbox :value="4" style="margin-bottom: 8px">2501~3000</a-checkbox>
- <a-checkbox :value="5" style="margin-left: 0; margin-bottom: 8px">3001~3500</a-checkbox>
- <a-checkbox :value="6" style="margin-bottom: 8px">3501~4000</a-checkbox>
- <a-checkbox :value="7" style="margin-bottom: 8px">4001~4500</a-checkbox>
- <a-checkbox :value="8" style="margin-bottom: 8px">4501~5000</a-checkbox>
- <a-checkbox :value="9" style="margin-left: 0; margin-bottom: 8px">5001~5500</a-checkbox>
- <a-checkbox :value="10" style="margin-bottom: 8px">5500以上</a-checkbox>
- </a-checkbox-group>
- </div>
- </a-form-item>
- <a-form-item
- label="APP行为"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="allForm.platform_os == 1 && allForm.platform_os && lol == '1'"
- >
- <a-radio-group buttonStyle="solid" v-model="allForm.appType" @change="getAppType">
- <a-radio-button value="0">不限</a-radio-button>
- <a-radio-button value="1">按分类</a-radio-button>
- <a-radio-button value="2">按APP名称</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- label=" "
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="allForm.platform_os == 1 && allForm.appType == '1' && lol == '1'"
- class="else-label"
- >
- <a-select
- mode="multiple"
- style="width: 100%"
- optionFilterProp="children"
- showSearch
- :filterOption="filterOption"
- v-decorator="['appInterest', { rules: [{ required: true, message: '请选择APP行为' }] }]"
- >
- <a-select-option v-for="item in optionsAppActive" :key="item.tagId" :value="item.tagId">{{
- item.tagName
- }}</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item
- label=" "
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="allForm.platform_os == 1 && allForm.appType == '2' && lol == '1'"
- class="else-label"
- >
- <div style="position: relative" v-clickoutside="handleClose">
- <a-input
- placeholder="请输入搜索内容"
- @change="getAppAll"
- @focus="getAppAllElse"
- style="width: 100%; position: relative"
- v-model="appListValue"
- />
- <div
- style="
- width: 100%;
- position: absolute;
- z-index: 10;
- height: 200px;
- background: white;
- overflow: auto;
- box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);
- "
- v-if="closeDialog"
- >
- <ul>
- <li style="padding: 0 10px">
- <a-checkbox
- style="float: left; margin: 0 5px"
- @change="onCheckAllChange"
- :indeterminate="indeterminate"
- :checked="checkAll"
- ></a-checkbox
- >全选
- </li>
- <a-checkbox-group @change="onChange" v-model="checkArr" 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 }}
- </li>
- </a-checkbox-group>
- </ul>
- </div>
- <div style="width: 100%" v-if="optionsAll.length > 0">
- <a-tag v-for="item of optionsAll" :key="item" closable :afterClose="() => log(item)">
- {{ showAppName(item) ? showAppName(item) : item }}
- </a-tag>
- </div>
- </div>
- </a-form-item>
- <a-form-item
- label="商业兴趣"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="lol == '1'"
- >
- <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
- >
- </a-form-item>
- <a-form-item
- label=" "
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- class="else-label"
- v-if="allForm.businessInterestType == 2 && lol == '1'"
- >
- <a-select
- mode="multiple"
- style="width: 100%"
- optionFilterProp="children"
- showSearch
- :filterOption="filterOption"
- v-decorator="['businessInterest', { rules: [{ required: true, message: '请选择商业兴趣' }] }]"
- >
- <a-select-option v-for="item in businessOptions" :key="item.tagId" :value="item.tagId">{{
- item.tagName
- }}</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item
- label="网络环境"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- >
- <a-radio-group
- buttonStyle="solid"
- v-decorator="[
- 'network',
- {
- initialValue: 0,
- },
- ]"
- >
- <a-radio-button :value="0">不限</a-radio-button>
- <a-radio-button :value="1">Wi-Fi</a-radio-button>
- <a-radio-button :value="2">移动网络</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- label="网红粉丝"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="lol == '1'"
- >
- <a-radio-group buttonStyle="solid" v-model="allForm.fansStar" @change="fansStar">
- <a-radio-button value="0">不限</a-radio-button>
- <a-radio-button value="1">网红类别</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- label=" "
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- class="else-label"
- v-if="allForm.fansStar == '1' && lol == '1'"
- >
- <a-select
- mode="multiple"
- style="width: 100%"
- optionFilterProp="children"
- showSearch
- :filterOption="filterOption"
- v-decorator="['fansStar', { rules: [{ required: true, message: '请选择网红类别' }] }]"
- >
- <a-select-option v-for="item in fansStarOptions" :key="item.tagId" :value="item.tagId">{{
- item.tagName
- }}</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item
- label="兴趣视频用户"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="lol == '1'"
- >
- <a-radio-group buttonStyle="solid" v-model="allForm.interestVideo" @change="interestVideo">
- <a-radio-button value="0">不限</a-radio-button>
- <a-radio-button value="1">视频标签</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- label=" "
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- class="else-label"
- v-if="allForm.interestVideo == '1' && lol == '1'"
- >
- <a-select
- mode="multiple"
- style="width: 100%"
- optionFilterProp="children"
- showSearch
- showArrow
- :filterOption="filterOption"
- v-decorator="['interestVideo', { rules: [{ required: true, message: '请选择视频标签' }] }]"
- >
- <a-select-option v-for="item in interestVideoOptions" :key="item.tagId" :value="item.tagId">{{
- item.tagName
- }}</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item
- label="过滤已转化用户"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 15 }, sm: { span: 15 } }"
- >
- <a-radio-group buttonStyle="solid" v-decorator="['filterConvertedLevel', { initialValue: 0 }]">
- <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-button :value="3">本账户</a-radio-button>
- <a-radio-button :value="4">公司主体</a-radio-button>
- <a-radio-button :value="5">APP</a-radio-button>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- label="智能扩量"
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- v-if="lol == '1'"
- >
- <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>
- </a-radio-group>
- </a-form-item>
- <a-form-item
- label=" "
- :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
- :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
- class="else-label"
- v-if="allForm.isOpen == 1 && lol == '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-form-item>
- </a-form>
- </template>
- <script>
- import { getAction, postAction } from '@/api/manage'
- import moment from 'moment'
- import { mapGetters } from 'vuex'
- import jq from 'jquery'
- import selectRegion from './selectRegion'
- import pick from 'lodash.pick'
- let dateQuantumRangeConst = ''
- const clickoutside = {
- // 初始化指令
- bind(el, binding, vnode) {
- function documentHandler(e) {
- // 这里判断点击的元素是否是本身,是本身,则返回
- if (el.contains(e.target)) {
- return false
- }
- // 判断指令中是否绑定了函数
- if (binding.expression) {
- // 如果绑定了函数 则调用那个函数,此处binding.value就是handleClose方法
- binding.value(e)
- }
- }
- // 给当前元素绑定个私有变量,方便在unbind中可以解除事件监听
- el.__vueClickOutside__ = documentHandler
- document.addEventListener('click', documentHandler)
- },
- update() {},
- unbind(el, binding) {
- // 解除事件监听
- document.removeEventListener('click', el.__vueClickOutside__)
- delete el.__vueClickOutside__
- },
- }
- const columns = [
- {
- title: '人群',
- dataIndex: 'orientationName',
- scopedSlots: { customRender: 'orientationName' },
- width: 150,
- },
- {
- title: '属性',
- dataIndex: 'populationType',
- filters: [
- { text: '上传人群', value: '1' },
- { text: '广告人群', value: '2' },
- { text: '主题专区', value: '3' },
- { text: '逻辑规则', value: '4' },
- { text: '人群扩展', value: '5' },
- { text: '平台定制', value: '6' },
- { text: '定制付费', value: '7' },
- { text: '网红粉丝类别', value: '8' },
- { text: '内容付费行为', value: '9' },
- { text: '移动应用安装', value: '10' },
- { text: '快手使用活跃度', value: '11' },
- { text: '行业分类', value: '12' },
- { text: '商业兴趣', value: '13' },
- { text: '固化标签', value: '14' },
- { text: '行业偏好', value: '15' },
- { text: '第三方标签', value: '16' },
- { text: '产品关键词', value: '17' },
- ],
- onFilter: (value, record) => record.populationType.toString().toLowerCase().includes(value.toLowerCase()),
- scopedSlots: { customRender: 'populationType' },
- width: 150,
- },
- {
- title: '创建时间',
- dataIndex: 'putTime',
- scopedSlots: { customRender: 'putTime' },
- sorter: (a, b) => a.putTime - b.putTime,
- },
- ]
- export default {
- name: 'BaseForm',
- components: { selectRegion },
- props: {
- campaignId: {
- type: String,
- default() {
- return null
- },
- },
- platform: {
- default() {
- return null
- },
- },
- populationData: {},
- lol: {
- type: String,
- default() {
- return '1'
- },
- },
- },
- filters: {
- getDate(value) {
- let date = new Date(value)
- let y = date.getFullYear()
- let MM = date.getMonth() + 1
- MM = MM < 10 ? '0' + MM : MM
- let d = date.getDate()
- d = d < 10 ? '0' + d : d
- return y + '-' + MM + '-' + d
- },
- platform(str) {
- var data = {
- 1: 'Android应用下载',
- 2: 'Android网页游戏',
- 3: 'iOS应用下载',
- 4: 'iOS网页游戏',
- }
- return data[str]
- },
- population_type(str) {
- var data = {
- 1: '上传人群',
- 2: '广告人群',
- 3: '主题专区',
- 4: '逻辑规则',
- 5: '人群扩展',
- 6: '平台定制',
- 7: '定制付费',
- 8: '网红粉丝类别',
- 9: '内容付费行为',
- 10: '移动应用安装',
- 11: '快手使用活跃度',
- 12: '行业分类',
- 13: '商业兴趣',
- 14: '固化标签',
- 15: '行业偏好',
- 16: '第三方标签',
- 17: '产品关键词',
- }
- return data[str]
- },
- },
- watch: {
- platform(n, o) {
- if (n == 1 || n == 2) {
- // platform_os
- this.allForm.platform_os = 1
- // this.form.setFieldsValue({ platform_os: '1' })
- } else if (n == 3 || n == 4) {
- this.allForm.platform_os = 2
- // this.form.setFieldsValue({ platform_os: '2' })
- } else {
- this.allForm.platform_os = 0
- // this.form.setFieldsValue({ platform_os: '0' })
- }
- },
- populationData: {
- immediate: true, // immediate选项可以开启首次赋值监听
- handler(n, oldVal) {
- console.log(n)
- if (n.allForm) {
- this.allForm = n.allForm
- this.allForm.noAgeBreak = n.noAgeBreak == '0' ? false : true
- this.allForm.noGenderBreak = n.noGenderBreak == '0' ? false : true
- this.allForm.noAreaBreak = n.noAreaBreak == '0' ? false : true
- this.selectedRowKeys = n.population ? n.population : []
- this.selectedRowKeysNo = n.excludePopulation ? n.excludePopulation : []
- this.optionsAll = n.appIds ? (typeof n.appIds == 'string' ? JSON.parse(n.appIds) : n.appIds) : []
- n.behavior = typeof n.behavior === 'string' ? JSON.parse(n.behavior) : n.behavior;
- n.interest = typeof n.interest === 'string' ? JSON.parse(n.interest) : n.interest;
- this.$nextTick(() => {
- this.formAll.setFieldsValue(
- pick(n, [
- 'fansStar',
- 'interestVideo',
- 'appInterest',
- 'gender',
- 'network',
- 'agesRange',
- 'age',
- 'androidOsv',
- 'iosOsv',
- 'deviceBrand',
- 'devicePrice',
- 'businessInterest',
- 'filterConvertedLevel',
- 'timeType',
- 'strengthType',
- 'sceneType',
- ])
- )
- setTimeout(() => {
- this.formAll.setFieldsValue(
- pick(n, [
- 'behavior',
- 'interest'
- ])
- )
- },100)
- })
- } else {
- this.formAll.resetFields()
- this.selectedRowKeys = []
- this.selectedRowKeysNo = []
- this.selectedRowKeysValueNo = []
- this.selectedRowKeysValue = []
- this.targeted = '2'
- this.people = '2'
- this.allForm = {
- behaviorInterest: '0',
- regionType: 'noLimit',
- region: [],
- ageType: 'noLimit',
- age: [],
- device: '0',
- price: '0',
- appType: '0',
- fansStar: '0',
- interestVideo: '0',
- platform_os: 0,
- businessInterestType: 0,
- isOpen: 0,
- noAgeBreak: false,
- noGenderBreak: 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)
- }
- }
- }
- },
- 'allForm.isOpen': function (n, o) {
- console.log(n, o)
- if (n == 0) {
- this.allForm.noAgeBreak = false
- this.allForm.noGenderBreak = false
- this.allForm.noAreaBreak = false
- }
- },
- },
- directives: { clickoutside },
- data() {
- return {
- behaviorData: [],
- interestData: [],
- optionsAll: [],
- formAll: this.$form.createForm(this),
- marks: {
- 5: '5岁',
- 10: '10岁',
- 15: '15岁',
- 20: '20岁',
- 25: '25岁',
- 30: '30岁',
- 35: '35岁',
- 40: '40岁',
- 45: '45岁',
- 50: '50岁',
- 55: '55岁',
- },
- step: 0,
- loading: false,
- checkArr: [],
- appListValue: '',
- checkAll: false,
- behaviorInterest: '0',
- allForm: {
- behaviorInterest: '0',
- regionType: 'noLimit',
- region: [],
- ageType: 'noLimit',
- age: [],
- device: '0',
- price: '0',
- appType: '0',
- fansStar: '0',
- interestVideo: '0',
- platform_os: 0,
- businessInterestType: 0,
- isOpen: 0,
- noAgeBreak: false,
- noGenderBreak: false,
- noAreaBreak: false,
- people: '2',
- targeted: '2',
- topMiddle: false,
- topMiddleNo: false,
- keyValue: '',
- keyValueNo: '',
- },
- options: [],
- optionsAll: [],
- optionProps: {
- value: 'regionId',
- label: 'name',
- children: 'children',
- multiple: true,
- emitPath: false,
- // checkStrictly: true
- },
- optionsApp: [],
- optionsAppActive: [],
- checkOptions: [],
- businessOptions: [],
- fansStarOptions: [],
- interestVideoOptions: [],
- optionPropsApp: {
- value: 'tagId',
- label: 'tagName',
- children: 'children',
- multiple: true,
- emitPath: false,
- },
- getApp: '0',
- closeDialog: false,
- indeterminate: false,
- checkAll: false,
- people: '2',
- targeted: '2',
- topMiddle: false,
- topMiddleNo: false,
- keyValue: '',
- keyValueNo: '',
- columns,
- selectedRowKeys: [],
- selectedRowKeysValue: [],
- selectedRowKeysNo: [],
- selectedRowKeysValueNo: [],
- dataList: [],
- dataElse: [],
- }
- },
- computed: {},
- methods: {
- getPeople() {
- var data = ''
- if (this.$route.path == '/creat/creatUnit') {
- data = localStorage.getItem('campaignAccountId')
- } else {
- data = localStorage.getItem('accountId')
- }
- return new Promise((resolve, reject) => {
- getAction('/kuaishou/batch/getPopulationList', { accountId: data }).then((res) => {
- if (res.success) {
- if (res.result) {
- this.dataList = res.result.map((item, index) => {
- return {
- ...item,
- key: index,
- }
- })
- this.dataElse = this.dataList
- resolve(res.result)
- }
- }
- })
- })
- },
- radioChange() {
- this.selectedRowKeys = []
- this.selectedRowKeysValue = []
- this.selectedRowKeysNo = []
- this.selectedRowKeysValueNo = []
- this.keyValue = ''
- this.keyValueNo = ''
- },
- onSelectChange(selectedRowKeys, selectionRows) {
- this.selectedRowKeys = selectedRowKeys
- 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),
- },
- }
- },
- onSelectChangeNo(selectedRowKeys, selectionRows) {
- this.selectedRowKeysNo = selectedRowKeys
- 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),
- },
- }
- },
- okSelect() {
- this.keyValue = ''
- this.topMiddle = false
- for (let i = 0; i < this.selectedRowKeysValue.length; i++) {
- this.keyValue += this.selectedRowKeysValue[i].orientationName + ' '
- }
- },
- okSelectNo() {
- this.keyValueNo = ''
- this.topMiddleNo = false
- for (let i = 0; i < this.selectedRowKeysValueNo.length; i++) {
- this.keyValueNo += this.selectedRowKeysValueNo[i].orientationName + ' '
- }
- },
- showOne() {
- // this.keyValueNo =orientationName
- var data = this.keyValue.split(' ')
- this.dataList = this.dataElse.filter((item) => {
- return item.orientationName.toLowerCase().indexOf(data[data.length - 1].toLowerCase()) > -1
- })
- },
- showTwo() {
- // this.keyValueNo =orientationName
- var data = this.keyValueNo.split(' ')
- this.dataList = this.dataElse.filter((item) => {
- return item.orientationName.toLowerCase().indexOf(data[data.length - 1].toLowerCase()) > -1
- })
- },
- getAge(e) {
- this.allForm.noAgeBreak = e.target.checked
- },
- getGender(e) {
- this.allForm.noGenderBreak = e.target.checked
- },
- getArea(e) {
- this.allForm.noAreaBreak = e.target.checked
- },
- getRegion(data) {
- this.$refs.cascaderRegion.getCheckedNodes()
- var dataName = this.$refs.cascaderRegion.getCheckedNodes()
- var jsonArr = data
- for (let i = 0; i < dataName.length; i++) {
- for (let j = 0; j < data.length; j++) {
- if (dataName[i].children.length > 0) {
- if (data[j].substring(0, 2) == dataName[i].value) {
- jsonArr.splice(j, 1)
- }
- }
- }
- }
- },
- showAppName(appId) {
- if (this.checkOptions.length > 0) {
- var data = this.checkOptions.filter((item) => {
- return item.appId == appId
- })
- if (data[0]) {
- return data[0].appName
- } else {
- return null
- }
- } else {
- return null
- }
- },
- log(appId) {
- var index = this.optionsAll.findIndex((item) => item === appId)
- this.optionsAll.splice(index, 1)
- if (this.optionsAll.length == 0) {
- this.indeterminate = false
- this.checkAll = false
- }
- },
- handleClose(e) {
- this.closeDialog = false
- },
- targetedShow(e) {
- this.topMiddle = false
- this.topMiddleNo = false
- },
- clearAll() {
- this.checkArr = []
- this.indeterminate = false
- this.checkAll = false
- },
- onChange(checkedList) {
- this.indeterminate =
- !!checkedList.length &&
- checkedList.length <
- this.optionsApp.map((item) => {
- return item.appId
- }).length
- this.checkAll =
- checkedList.length ===
- this.optionsApp.map((item) => {
- return item.appId
- }).length
- },
- onCheckAllChange(e) {
- Object.assign(this, {
- checkArr: e.target.checked
- ? this.optionsApp.map((item) => {
- return item.appId
- })
- : [],
- indeterminate: false,
- checkAll: e.target.checked,
- })
- if (this.optionsAll.length > 20) {
- this.$message.error('最多选择20个APP行为')
- this.checkArr = []
- this.indeterminate = false
- this.checkAll = false
- }
- // if (this.checkAll) {
- // this.checkArr = []
- // } else {
- // this.checkArr = this.optionsApp.map(item => {
- // return item.app_id
- // })
- // }
- // this.checkAll = !this.checkAll
- },
- handleSubmit() {
- // e.preventDefault()
- this.formAll.validateFields((err, values) => {
- if (!err) {
- // this.checkArr
- if (values.age) {
- values.min = values.age[0]
- values.max = values.age[1]
-
- }else {
- values.min = -1
- values.max = -1
- }
- if (values.agesRange) {
- }else {
- values.agesRange = []
- }
- if(values.fansStar) {
- }else{
- values.fansStar = []
- }
- if(values.interestVideo) {
- }else{
- values.interestVideo = []
- }
- if(values.devicePrice) {
- }else{
- values.devicePrice = []
- }
- if(values.deviceBrand) {
- }else{
- values.deviceBrand = []
- }
- if(this.allForm.businessInterestType == 2){
- }else{
- values.businessInterest = []
- }
- var json = {}
- if (this.allForm.appType == '2') {
- json.appIds = this.optionsAll
- values.appInterest = []
- }else if(this.allForm.appType == '1') {
- json.appIds = []
- }else{
- values.appInterest = []
- json.appIds = []
- }
- if (this.allForm.regionType == 'limit') {
- json.region = this.allForm.region.map((item) => {
- return item.value
- })
- }else{
- json.region = []
- }
- var jsonData = {}
- if (this.people == '3') {
- if (this.targeted == '2') {
- jsonData.population = this.selectedRowKeysValue.map((item) => {
- return item.orientationId
- })
- jsonData.excludePopulation = []
- } else if (this.targeted == '3') {
- jsonData.population = []
- jsonData.excludePopulation = this.selectedRowKeysValueNo.map((item) => {
- return item.orientationId
- })
- } else if (this.targeted == '4') {
- jsonData.population = this.selectedRowKeysValue.map((item) => {
- return item.orientationId
- })
- jsonData.excludePopulation = this.selectedRowKeysValueNo.map((item) => {
- return item.orientationId
- })
- } else {
- jsonData = {}
- }
- }
- var dataJson = {
- ...values,
- platformOs: this.allForm.platform_os,
- businessInterestType: this.allForm.businessInterestType,
- isOpen: this.allForm.isOpen,
- ...json,
- noAgeBreak: this.allForm.noAgeBreak ? 1 : 0,
- noGenderBreak: this.allForm.noGenderBreak ? 1 : 0,
- noAreaBreak: this.allForm.noAreaBreak ? 1 : 0,
- allForm: this.allForm,
- ...jsonData,
- }
- this.$emit('update:populationData', dataJson)
- }
- else {
-
- }
- })
- },
- handleConfirmValue(rule, value, callback) {
- if (Math.abs(value[0] - value[1]) < 5) {
- callback('自定义年龄段需要间隔大于5岁')
- }
- callback()
- },
- manyValidator(rule, value, callback) {
- if (value.length > 20) {
- callback('最多只能选择20个选项')
- }
- callback()
- },
- regionChange() {
- this.allForm.region = []
- },
- search(e) {},
- put() {
- var data = this.allForm.region.map((item) => {
- return item[1] + ''
- })
- var dataElse = data.map((item) => {
- return [item.substring(0, 2), item]
- })
- },
- getAppAllElse(e) {
- this.checkArr = this.optionsAll
- // this.getAppAll()
- var data = ''
- if (this.$route.path == '/creat/creatUnit') {
- data = localStorage.getItem('campaignAccountId')
- } else {
- data = localStorage.getItem('accountId')
- }
- if (this.appListValue != '') {
- getAction('/kuaishou/batch/getAppSearch', {
- accountId: data,
- appName: e.target.value,
- }).then((res) => {
- if (res.result) {
- this.optionsApp = res.result
- this.checkOptions.push(...res.result)
- this.closeDialog = true
- } else {
- this.optionsApp = []
- this.closeDialog = false
- }
- })
- } else {
- this.optionsApp = []
- this.closeDialog = false
- }
- },
- getAppAll(e) {
- var data = ''
- if (this.$route.path == '/creat/creatUnit') {
- data = localStorage.getItem('campaignAccountId')
- } else {
- data = localStorage.getItem('accountId')
- }
- if (e.target.value !== '') {
- getAction('/kuaishou/batch/getAppSearch', {
- accountId: data,
- appName: e.target.value,
- }).then((res) => {
- if (res.result) {
- this.optionsApp = res.result
- this.checkOptions.push(...res.result)
- this.closeDialog = true
- } else {
- this.optionsApp = []
- this.closeDialog = false
- }
- })
- } else {
- this.optionsApp = []
- this.closeDialog = false
- }
- },
- getAppType(e) {
- this.optionsApp = []
- this.formAll.setFieldsValue({ appInterest: [] })
- this.checkArr = []
- if (e.target.value == '1') {
- getAction('/kuaishou/batch/getTargetList', { tagType: 'APP_INTEREST' }).then((res) => {
- if (res.success) {
- this.optionsApp = res.result
- }
- })
- }
- },
- businessInterest(e) {
- this.formAll.setFieldsValue({ businessInterest: [] })
- if (e.target.value == '2') {
- this.getDataType('BUSINESS_INTEREST', 'businessOptions')
- }
- },
- fansStar(e) {
- if (e.target.value == '1') {
- this.getDataType('FANS_STAR', 'fansStarOptions')
- }
- },
- interestVideo(e) {
- if (e.target.value == '1') {
- this.getDataType('INTEREST_VIDEO', 'interestVideoOptions')
- }
- },
- filterOption(input, option) {
- return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- getDataType(type, dataList) {
- getAction('/kuaishou/batch/getTargetList', { tagType: type }).then((res) => {
- if (res.success) {
- this[dataList] = res.result
- }
- })
- },
- getData(className) {
- return this.formAll.getFieldValue(className)
- },
- getTreeData(data) {
- for (var i = 0; i < data.length; i++) {
- if (data[i].children) {
- if (data[i].children.length < 1) {
- // children若为空数组,则将children设为undefined
- data[i].children = null
- } else {
- // // children若不为空数组,则继续 递归调用 本方法
- this.getTreeData(data[i].children)
- }
- }
- }
- return data
- },
- getAllData(data){
- console.log(data)
- }
- },
- mounted: function () {
- this.getDataType('APP_INTEREST', 'optionsAppActive')
- this.getDataType('BUSINESS_INTEREST', 'businessOptions')
- this.getDataType('FANS_STAR', 'fansStarOptions')
- this.getDataType('INTEREST_VIDEO', 'interestVideoOptions')
- // this.behaviorData
- this.getAction('/batch/kuaishouTemplate/getbehaviorInterest' ,{ accountId:23212 }).then( res => {
- if(res.success) {
- this.behaviorData = this.getTreeData(res.result.behavior_interest.behavior);
- this.interestData = this.getTreeData(res.result.behavior_interest.interest);
- }
- })
- },
- }
- </script>
- <style type="text/css">
- .plug-timer-grid {
- width: 100%;
- }
- .plug-timer-grid td,
- .plug-timer-grid th {
- border: 1px solid #97b4d1;
- text-align: center; /*cursor:pointer;*/
- font-size: 10px;
- line-height: 10px;
- }
- .Selected {
- background-color: rgb(102, 162, 243);
- opacity: 0.5;
- }
- .plug-timer-grid {
- border-collapse: collapse;
- z-index: 4;
- }
- .plug-timer-grid thead tr {
- display: table-row;
- vertical-align: inherit;
- border-color: inherit;
- }
- .group-creat table td {
- height: 20px;
- max-width: 5px;
- font-size: 12px;
- text-align: center;
- vertical-align: middle;
- overflow: hidden;
- transition: background 0.5s;
- -webkit-transition: background 0.5s;
- }
- .plug-timer-grid tbody th {
- width: 4%;
- }
- .plug-timer-grid tbody tr td {
- width: 2%;
- }
- /*.clear{*/
- /* margin:20px 0px 20px 0px;*/
- /*}*/
- </style>
|