Просмотр исходного кода

智能投放3.0提测(媒体已经废弃)

朱鑫波 2 лет назад
Родитель
Сommit
4bfdc5c412

+ 1 - 1
src/filters.js

@@ -147,7 +147,7 @@ const filters = {
             10: '曝光',
             11: '点击',
             31: '下载完成',
-            53: '提交线索',
+            53: '表单提交',
             180: '激活',
             190: '付费',
             191: '首日ROI',

+ 3 - 3
src/views/modules/autoLaunchRevision/autoLaunchList.vue

@@ -419,8 +419,8 @@ export default {
             editID: 0,
 
             url: {
-                list: '/auto/aiKuaishouAccountAutoStrategy/list',
-                delete: '/auto/aiKuaishouAccountAutoStrategy/delete'
+                list: '/auto/v3KuaishouAccountAutoStrategy/list',
+                delete: '/auto/v3KuaishouAccountAutoStrategy/delete'
             },
 
             xiugaiData: [] //存分别修改时候的数组
@@ -446,7 +446,7 @@ export default {
             record.spin = true
 
             let status = text == 1 ? 0 : 1
-            this.postDataAction(`/auto/aiKuaishouAccountAutoStrategy/updateState`, {
+            this.postDataAction(`/auto/v3KuaishouAccountAutoStrategy/edit`, {
                 id: record.id,
                 status
             }).then(res => {

+ 205 - 181
src/views/modules/autoLaunchRevision/components/targetedPopulation.vue

@@ -51,7 +51,7 @@ li:hover {
                     </a-radio-group>
                 </div>
             </div>
-            <div class="dingxiang_paichu" v-if="allForm.people != '0'" style="width:100%">
+            <div class="dingxiang_paichu" v-if="allForm.people != '0'" style="width: 100%">
                 <a-tabs v-model="allForm.tabKey" @change="retargetAccountId()">
                     <a-button
                         slot="tabBarExtraContent"
@@ -63,10 +63,10 @@ li:hover {
                     <a-tab-pane key="1" tab="定向池" v-if="allForm.people != '2'">
                         <a-table
                             :columns="retargetColumns"
-                            :row-key="record => record.key"
+                            :row-key="(record) => record.key"
                             :data-source="retargetDataAll"
                             :loading="loading"
-                            style="width:100%;margin:15px 0"
+                            style="width: 100%; margin: 15px 0"
                             :pagination="false"
                             :scroll="{ y: 250 }"
                             :row-selection="rowSelectionMin"
@@ -84,10 +84,10 @@ li:hover {
                     <a-tab-pane key="2" tab="排除池" v-if="allForm.people != '1'">
                         <a-table
                             :columns="retargetColumns"
-                            :row-key="record => record.key"
+                            :row-key="(record) => record.key"
                             :data-source="retargetDataAll"
                             :loading="loading"
-                            style="width:100%;margin:15px 0"
+                            style="width: 100%; margin: 15px 0"
                             :pagination="false"
                             :scroll="{ y: 250 }"
                             :row-selection="rowSelectionMax"
@@ -150,8 +150,8 @@ li:hover {
                         'age',
                         {
                             rules: [{ required: true, message: '请选择年龄段' }, { validator: handleConfirmValue }],
-                            initialValue: [10, 50]
-                        }
+                            initialValue: [10, 50],
+                        },
                     ]"
                 />
             </div>
@@ -166,13 +166,13 @@ li:hover {
                 v-decorator="[
                     'gender',
                     {
-                        initialValue: 0
-                    }
+                        initialValue: '',
+                    },
                 ]"
             >
-                <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="''">不限</a-radio-button>
+                <a-radio-button value="F">女性</a-radio-button>
+                <a-radio-button value="M">男性</a-radio-button>
             </a-radio-group>
         </a-form-item>
 
@@ -290,7 +290,7 @@ li:hover {
             :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-group buttonStyle="solid" v-model="allForm.platform">
                 <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>
@@ -300,53 +300,57 @@ li:hover {
             label=" "
             :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
             :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-            v-if="allForm.platform_os == 1"
+            v-if="allForm.platform == 1"
             class="else-label"
             style="margin-top: -16px"
         >
             <a-radio-group
                 v-decorator="[
-                    'androidOsv',
+                    'android',
                     {
-                        initialValue: 3
-                    }
+                        initialValue: '3.0',
+                    },
                 ]"
             >
-                <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 value="3.0">3X+</a-radio>
+                <a-radio value="4.0">4X+</a-radio>
+                <a-radio value="5.0">5x+</a-radio>
+                <a-radio value="6.0">6x+</a-radio>
+                <a-radio value="7.0">7x+</a-radio>
+                <a-radio value="8.0">8x+</a-radio>
+                <a-radio value="9.0">9x+</a-radio>
+                <a-radio value="10.0">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"
+            v-if="allForm.platform == 2"
             class="else-label"
             style="margin-top: -16px"
         >
             <a-radio-group
                 v-decorator="[
-                    'iosOsv',
+                    'ios',
                     {
-                        initialValue: 6
-                    }
+                        initialValue: '6.0',
+                    },
                 ]"
             >
-                <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 value="6.0">6X+</a-radio>
+                <a-radio value="7.0">7X+</a-radio>
+                <a-radio value="8.0">8x+</a-radio>
+                <a-radio value="9.0">9x+</a-radio>
+                <a-radio value="10.0">10x+</a-radio>
+                <a-radio value="11.0">11x+</a-radio>
+                <a-radio value="12.0">12x+</a-radio>
+                <a-radio value="13.0">13x+</a-radio>
+                <a-radio value="14.0">14x+</a-radio>
             </a-radio-group>
         </a-form-item>
         <a-form-item
-            v-if="allForm.platform_os != 2"
+            v-if="allForm.platform != 2"
             label="设备品牌"
             :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
             :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
@@ -357,20 +361,43 @@ li:hover {
             </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: '请选择设备品牌' }] }]"
+                    v-decorator="['deviceBrandIds', { rules: [{ required: true, message: '请选择设备品牌' }] }]"
                     style="width: 120%"
                 >
-                    <a-checkbox :value="1" style="margin-bottom: 8px">OPPO</a-checkbox>
+                
+                    <a-checkbox :value="3" 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="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="9" 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 :value="10" style="margin-bottom: 8px">HTC</a-checkbox>
+
+                    
+                    <a-checkbox :value="11" style="margin-bottom: 8px">联想</a-checkbox>
+                    <a-checkbox :value="12" style="margin-bottom: 8px">酷派</a-checkbox>
+                    <a-checkbox :value="13" style="margin-bottom: 8px">酷比</a-checkbox>
+                    <a-checkbox :value="14" style="margin-bottom: 8px">中兴</a-checkbox>
+                    <a-checkbox :value="15" style="margin-bottom: 8px">乐视</a-checkbox>
+                    <a-checkbox :value="16" style="margin-bottom: 8px">LG</a-checkbox>
+                    <a-checkbox :value="17" style="margin-bottom: 8px">中国移动</a-checkbox>
+                    <a-checkbox :value="18" style="margin-bottom: 8px">360</a-checkbox>
+                    <a-checkbox :value="19" style="margin-bottom: 8px">百度</a-checkbox>
+                    <a-checkbox :value="20" style="margin-bottom: 8px">努比亚</a-checkbox>
+                    <a-checkbox :value="21" style="margin-bottom: 8px">一加</a-checkbox>
+                    <a-checkbox :value="22" style="margin-bottom: 8px">海信</a-checkbox>
+                    <a-checkbox :value="23" style="margin-bottom: 8px">朵唯</a-checkbox>
+                    
+                    <a-checkbox :value="24" style="margin-bottom: 8px">美图</a-checkbox>
+                    <a-checkbox :value="25" style="margin-bottom: 8px">锤子</a-checkbox>
+                    <a-checkbox :value="26" style="margin-bottom: 8px">谷歌</a-checkbox>
+                    <a-checkbox :value="27" style="margin-bottom: 8px">小辣椒</a-checkbox>
+                    <a-checkbox :value="28" style="margin-bottom: 8px">诺基亚</a-checkbox>
+                    <a-checkbox :value="29" style="margin-bottom: 8px">康佳</a-checkbox>
+                    <a-checkbox :value="1" v-if="allForm.platform == 0" style="margin-bottom: 8px">苹果</a-checkbox>
                 </a-checkbox-group>
             </div>
         </a-form-item>
@@ -388,7 +415,8 @@ li:hover {
                     v-decorator="['devicePrice', { rules: [{ required: true, message: '请选择设备价格' }] }]"
                     style="width: 120%"
                 >
-                    <a-checkbox :value="1" style="margin-bottom: 8px">1500以下</a-checkbox>
+                    <a-checkbox :value="0" style="margin-bottom: 8px">1000以下</a-checkbox>
+                    <a-checkbox :value="1" style="margin-bottom: 8px">1001~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>
@@ -405,7 +433,7 @@ li:hover {
             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'"
+            v-if="allForm.platform == 1 && allForm.platform && lol == '1'"
         >
             <a-radio-group buttonStyle="solid" v-model="allForm.appType" @change="getAppType">
                 <a-radio-button value="0">不限</a-radio-button>
@@ -417,7 +445,7 @@ li:hover {
             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'"
+            v-if="allForm.platform == 1 && allForm.appType == '1' && lol == '1'"
             class="else-label"
         >
             <a-select
@@ -426,7 +454,7 @@ li:hover {
                 optionFilterProp="children"
                 showSearch
                 :filterOption="filterOption"
-                v-decorator="['appInterest', { rules: [{ required: true, message: '请选择APP行为' }] }]"
+                v-decorator="['appInterestIds', { rules: [{ required: true, message: '请选择APP行为' }] }]"
             >
                 <a-select-option v-for="item in optionsAppActive" :key="item.tagId" :value="item.tagId">{{
                     item.tagName
@@ -437,7 +465,7 @@ li:hover {
             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'"
+            v-if="allForm.platform == 1 && allForm.appType == '2' && lol == '1'"
             class="else-label"
         >
             <div style="position: relative" v-clickoutside="handleClose">
@@ -450,14 +478,14 @@ li:hover {
                 />
                 <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);
-          "
+                        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>
@@ -485,7 +513,7 @@ li:hover {
                 </div>
             </div>
         </a-form-item>
-        <a-form-item
+        <!-- <a-form-item
             label="商业兴趣"
             :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
             :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
@@ -520,7 +548,7 @@ li:hover {
                     item.tagName
                 }}</a-select-option>
             </a-select>
-        </a-form-item>
+        </a-form-item> -->
         <a-form-item
             label="网络环境"
             :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
@@ -531,13 +559,13 @@ li:hover {
                 v-decorator="[
                     'network',
                     {
-                        initialValue: 0
-                    }
+                        initialValue: '',
+                    },
                 ]"
             >
-                <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-button :value="''">不限</a-radio-button>
+                <a-radio-button value="wifi">Wi-Fi</a-radio-button>
+                <a-radio-button value="not_wifi">移动网络</a-radio-button>
             </a-radio-group>
         </a-form-item>
 
@@ -626,8 +654,8 @@ li:hover {
             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-button :value="false">关闭</a-radio-button>
+                <a-radio-button :value="true">开启</a-radio-button>
             </a-radio-group>
         </a-form-item>
         <a-form-item
@@ -635,12 +663,12 @@ li:hover {
             :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
             :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
             class="else-label"
-            v-if="allForm.isOpen == 1 && lol == '1'"
+            v-if="allForm.isOpen && 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 :disabled="getData('gender') == ''" :checked="allForm.noGenderBreak" @change="getGender"
                 >不可突破性别</a-checkbox
             >
             <a-checkbox
@@ -684,7 +712,7 @@ const clickoutside = {
         // 解除事件监听
         document.removeEventListener('click', el.__vueClickOutside__)
         delete el.__vueClickOutside__
-    }
+    },
 }
 
 const columns = [
@@ -692,7 +720,7 @@ const columns = [
         title: '人群',
         dataIndex: 'orientationName',
         scopedSlots: { customRender: 'orientationName' },
-        width: 150
+        width: 150,
     },
     {
         title: '属性',
@@ -714,22 +742,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,
+    },
 ]
 let retargetColumns = [
     {
@@ -737,55 +761,55 @@ let retargetColumns = [
         dataIndex: 'name',
         sorter: true,
         width: '40%',
-        scopedSlots: { customRender: 'name' }
+        scopedSlots: { customRender: 'name' },
     },
     {
         title: '属性',
         dataIndex: 'populationType',
         scopedSlots: {
-            customRender: 'populationType'
+            customRender: 'populationType',
         },
-        width: 200
+        width: 200,
     },
     {
         title: '所属账号',
         dataIndex: 'accountId',
         sorter: true,
         width: '40%',
-        scopedSlots: { customRender: 'accountId' }
-    }
+        scopedSlots: { customRender: 'accountId' },
+    },
 ]
 
 export default {
     name: 'new-create-template',
     components: {
-        selectRegion
+        selectRegion,
     },
     props: {
         campaignId: {
             type: String,
             default() {
                 return null
-            }
+            },
         },
         accountId: {
             type: [String, Number],
             default() {
                 return null
-            }
+            },
         },
         platform: {
             default() {
                 return null
-            }
+            },
         },
         populationData: {},
         lol: {
             type: String,
             default() {
                 return '1'
-            }
-        }
+            },
+        },
     },
     filters: {
         getDate(value) {
@@ -802,7 +826,7 @@ export default {
                 1: 'Android应用下载',
                 2: 'Android网页游戏',
                 3: 'iOS应用下载',
-                4: 'iOS网页游戏'
+                4: 'iOS网页游戏',
             }
             return data[str]
         },
@@ -824,10 +848,10 @@ export default {
                 14: '固化标签',
                 15: '行业偏好',
                 16: '第三方标签',
-                17: '产品关键词'
+                17: '产品关键词',
             }
             return data[str]
-        }
+        },
     },
     computed: {
         rowSelectionMax() {
@@ -839,13 +863,13 @@ export default {
                 // selectedRowKeys: this.finallyRightTree[
                 //     this.finallyRightTree.findIndex(item => item.key === this.activeKey)
                 // ].excludeSelectedRowKeys,
-                getCheckboxProps: record => ({
+                getCheckboxProps: (record) => ({
                     props: {
                         disabled: this.allForm.incluedSelectedRowKeys.indexOf(record.key) > -1,
                         name: record.name,
-                        defaultChecked: this.allForm.excludeSelectedRowKeys.indexOf(record.key) > -1
-                    }
-                })
+                        defaultChecked: this.allForm.excludeSelectedRowKeys.indexOf(record.key) > -1,
+                    },
+                }),
             }
         },
         rowSelectionMin() {
@@ -858,28 +882,28 @@ export default {
                 // selectedRowKeys: this.finallyRightTree[
                 //     this.finallyRightTree.findIndex(item => item.key === this.activeKey)
                 // ].incluedSelectedRowKeys,
-                getCheckboxProps: record => ({
+                getCheckboxProps: (record) => ({
                     props: {
                         disabled: this.allForm.excludeSelectedRowKeys.indexOf(record.key) > -1,
                         name: record.name,
-                        defaultChecked: this.allForm.incluedSelectedRowKeys.indexOf(record.key) > -1
-                    }
-                })
+                        defaultChecked: this.allForm.incluedSelectedRowKeys.indexOf(record.key) > -1,
+                    },
+                }),
             }
-        }
+        },
     },
     watch: {
         platform(n, o) {
             if (n == 1 || n == 2) {
-                // platform_os
-                this.allForm.platform_os = 1
-                // this.form.setFieldsValue({ platform_os: '1' })
+                // platform
+                this.allForm.platform = 1
+                // this.form.setFieldsValue({ platform: '1' })
             } else if (n == 3 || n == 4) {
-                this.allForm.platform_os = 2
-                // this.form.setFieldsValue({ platform_os: '2' })
+                this.allForm.platform = 2
+                // this.form.setFieldsValue({ platform: '2' })
             } else {
-                this.allForm.platform_os = 0
-                // this.form.setFieldsValue({ platform_os: '0' })
+                this.allForm.platform = 0
+                // this.form.setFieldsValue({ platform: '0' })
             }
         },
         populationData: {
@@ -900,17 +924,17 @@ export default {
                             pick(n, [
                                 'fansStar',
                                 'interestVideo',
-                                'appInterest',
+                                'appInterestIds',
                                 'gender',
                                 'network',
                                 'agesRange',
                                 'age',
-                                'androidOsv',
-                                'iosOsv',
-                                'deviceBrand',
+                                'android',
+                                'ios',
+                                'deviceBrandIds',
                                 'devicePrice',
                                 'businessInterest',
-                                'filterConvertedLevel'
+                                'filterConvertedLevel',
                                 // 'timeType',
                                 // 'strengthType',
                                 // 'sceneType'
@@ -941,19 +965,19 @@ export default {
                         interestVideo: '0',
                         people: '0',
                         tabKey: '',
-                        platform_os: 0,
-                        businessInterestType: 0,
-                        isOpen: 0,
+                        platform: 0,
+                        // businessInterestType: 0,
+                        isOpen: false,
                         noAgeBreak: false,
                         noGenderBreak: false,
                         noAreaBreak: false,
                         incluedSelectedRowKeys: [],
                         incluedSelectedKeys: [],
                         excludeSelectedKeys: [],
-                        excludeSelectedRowKeys: []
+                        excludeSelectedRowKeys: [],
                     }
                 }
-            }
+            },
         },
         checkArr(n, o) {
             console.log(n, o)
@@ -963,7 +987,7 @@ export default {
                 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}
+                    var c = new Set([...b].filter((item) => !a.has(item))) // {1}
                     console.log(...c)
                     var d = this.optionsAll.indexOf(...c)
                     if (d > 0) {
@@ -972,14 +996,14 @@ export default {
                 }
             }
         },
-        'allForm.isOpen': function(n, o) {
+        'allForm.isOpen': function (n, o) {
             console.log(n, o)
-            if (n == 0) {
+            if (!n) {
                 this.allForm.noAgeBreak = false
                 this.allForm.noGenderBreak = false
                 this.allForm.noAreaBreak = false
             }
-        }
+        },
     },
     directives: { clickoutside },
     data() {
@@ -1000,7 +1024,7 @@ export default {
                 40: '40岁',
                 45: '45岁',
                 50: '50岁',
-                55: '55岁'
+                55: '55岁',
             },
             step: 0,
             loading: false,
@@ -1019,9 +1043,9 @@ export default {
                 appType: '0',
                 fansStar: '0',
                 interestVideo: '0',
-                platform_os: 0,
-                businessInterestType: 0,
-                isOpen: 0,
+                platform: 0,
+                // businessInterestType: 0,
+                isOpen: false,
                 noAgeBreak: false,
                 noGenderBreak: false,
                 noAreaBreak: false,
@@ -1031,7 +1055,7 @@ export default {
                 topMiddle: false,
                 topMiddleNo: false,
                 keyValue: '',
-                keyValueNo: ''
+                keyValueNo: '',
             },
             retargetColumns,
             retargetDataAll: [],
@@ -1042,7 +1066,7 @@ export default {
                 label: 'name',
                 children: 'children',
                 multiple: true,
-                emitPath: false
+                emitPath: false,
                 // checkStrictly: true
             },
             optionsApp: [],
@@ -1056,7 +1080,7 @@ export default {
                 label: 'tagName',
                 children: 'children',
                 multiple: true,
-                emitPath: false
+                emitPath: false,
             },
             getApp: '0',
             closeDialog: false,
@@ -1074,7 +1098,7 @@ export default {
             selectedRowKeysNo: [],
             selectedRowKeysValueNo: [],
             dataList: [],
-            dataElse: []
+            dataElse: [],
         }
     },
     methods: {
@@ -1083,8 +1107,8 @@ export default {
                 this.refreshPopulationLoading = true
                 // this.$refs.application.showApplication()
                 this.getAction('/kuaishou/batch/pullPopulationList', {
-                    accountId: this.accountId
-                }).then(res => {
+                    accountId: this.accountId,
+                }).then((res) => {
                     if (res.success) {
                         this.refreshPopulationLoading = false
                         this.$message.success(res.message)
@@ -1118,11 +1142,11 @@ export default {
             this.loading = true
 
             this.getAction('/kuaishou/batch/getPopulationList', {
-                accountId: this.accountId
-            }).then(res => {
+                accountId: this.accountId,
+            }).then((res) => {
                 this.loading = false
                 if (res.success) {
-                    res.result.forEach(ele => {
+                    res.result.forEach((ele) => {
                         ele.key = ele.orientationId
                         ele.id = ele.orientationId
                         ele.name = ele.orientationName + '(' + ele.orientationId + ')'
@@ -1142,13 +1166,13 @@ export default {
                 data = localStorage.getItem('accountId')
             }
             return new Promise((resolve, reject) => {
-                getAction('/kuaishou/batch/getPopulationList', { accountId: data }).then(res => {
+                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
+                                    key: index,
                                 }
                             })
                             this.dataElse = this.dataList
@@ -1168,28 +1192,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() {
@@ -1209,14 +1233,14 @@ export default {
         showOne() {
             //    this.keyValueNo =orientationName
             var data = this.keyValue.split('   ')
-            this.dataList = this.dataElse.filter(item => {
+            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 => {
+            this.dataList = this.dataElse.filter((item) => {
                 return item.orientationName.toLowerCase().indexOf(data[data.length - 1].toLowerCase()) > -1
             })
         },
@@ -1245,7 +1269,7 @@ export default {
         },
         showAppName(appId) {
             if (this.checkOptions.length > 0) {
-                var data = this.checkOptions.filter(item => {
+                var data = this.checkOptions.filter((item) => {
                     return item.appId == appId
                 })
                 if (data[0]) {
@@ -1258,7 +1282,7 @@ export default {
             }
         },
         log(appId) {
-            var index = this.optionsAll.findIndex(item => item === appId)
+            var index = this.optionsAll.findIndex((item) => item === appId)
             this.optionsAll.splice(index, 1)
             if (this.optionsAll.length == 0) {
                 this.indeterminate = false
@@ -1281,24 +1305,24 @@ export default {
             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
         },
         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.optionsAll.length > 20) {
                 this.$message.error('最多选择20个APP行为')
@@ -1343,30 +1367,30 @@ export default {
                     } else {
                         values.devicePrice = []
                     }
-                    if (values.deviceBrand) {
+                    if (values.deviceBrandIds) {
                     } else {
-                        values.deviceBrand = []
-                    }
-                    if (this.allForm.businessInterestType == 2) {
-                    } else {
-                        values.businessInterest = []
+                        values.deviceBrandIds = []
                     }
+                    // if (this.allForm.businessInterestType == 2) {
+                    // } else {
+                    //     values.businessInterest = []
+                    // }
                     var json = {}
                     if (this.allForm.appType == '2') {
                         json.appIds = this.optionsAll
-                        values.appInterest = []
+                        values.appInterestIds = []
                     } else if (this.allForm.appType == '1') {
                         json.appIds = []
                     } else {
-                        values.appInterest = []
+                        values.appInterestIds = []
                         json.appIds = []
                     }
                     if (this.allForm.regionType == 'limit') {
-                        json.region = this.allForm.region.map(item => {
+                        json.regionCategoryIds = this.allForm.region.map((item) => {
                             return item.value
                         })
                     } else {
-                        json.region = []
+                        json.regionCategoryIds = []
                     }
                     var jsonData = {}
                     if (this.allForm.people == '0') {
@@ -1384,15 +1408,15 @@ export default {
                     }
                     var dataJson = {
                         ...values,
-                        platformOs: this.allForm.platform_os,
-                        businessInterestType: this.allForm.businessInterestType,
+                        platform: this.allForm.platform,
+                        // 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,
+                        noAgeBreak: this.allForm.noAgeBreak,
+                        noGenderBreak: this.allForm.noGenderBreak,
+                        noAreaBreak: this.allForm.noAreaBreak,
                         allForm: this.allForm,
-                        ...jsonData
+                        ...jsonData,
                     }
                     this.$emit('update:populationData', dataJson)
                 } else {
@@ -1416,10 +1440,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]
             })
         },
@@ -1430,8 +1454,8 @@ export default {
             if (this.appListValue != '') {
                 getAction('/kuaishou/batch/getAppSearch', {
                     accountId: data,
-                    appName: e.target.value
-                }).then(res => {
+                    appName: e.target.value,
+                }).then((res) => {
                     if (res.result) {
                         this.optionsApp = res.result
                         this.checkOptions.push(...res.result)
@@ -1451,8 +1475,8 @@ export default {
             if (e.target.value !== '') {
                 getAction('/kuaishou/batch/getAppSearch', {
                     accountId: data,
-                    appName: e.target.value
-                }).then(res => {
+                    appName: e.target.value,
+                }).then((res) => {
                     if (res.result) {
                         this.optionsApp = res.result
                         this.checkOptions.push(...res.result)
@@ -1469,10 +1493,10 @@ export default {
         },
         getAppType(e) {
             this.optionsApp = []
-            this.formAll.setFieldsValue({ appInterest: [] })
+            this.formAll.setFieldsValue({ appInterestIds: [] })
             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
                     }
@@ -1499,7 +1523,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
                 }
@@ -1524,22 +1548,22 @@ export default {
         },
         getAllData(data) {
             console.log(data)
-        }
+        },
     },
-    mounted: function() {
+    mounted: function () {
         this.getDataType('APP_INTEREST', 'optionsAppActive')
         this.getDataType('BUSINESS_INTEREST', 'businessOptions')
         this.getDataType('FANS_STAR', 'fansStarOptions')
         this.getDataType('INTEREST_VIDEO', 'interestVideoOptions')
         this.retargetAccountId()
         // this.behaviorData
-        this.getAction('/batch/kuaishouTemplate/getbehaviorInterest', { accountId: this.accountId }).then(res => {
+        this.getAction('/batch/kuaishouTemplate/getbehaviorInterest', { accountId: this.accountId }).then((res) => {
             if (res.success) {
                 this.behaviorData = this.getTreeData(res.result.behavior_interest.behavior)
                 this.interestData = this.getTreeData(res.result.behavior_interest.interest)
             }
         })
-    }
+    },
 }
 </script>
 

+ 13 - 13
src/views/modules/autoLaunchRevision/components/templateModal.vue

@@ -158,7 +158,7 @@ export default {
             params.id = item.id
             this.accountId = item.accountId
             this.templateId = item.id
-            getAction('/auto/aiKuaishouAccountAutoTarget/queryById', params).then(res => {
+            getAction('/auto/v3KuaishouAccountAutoTarget/queryById', params).then(res => {
                 if (res.success) {
                     var dataJson = {
                         ...res.result,
@@ -176,7 +176,7 @@ export default {
                     this.populationData.interestVideo = dataJson.interestVideo
                         ? JSON.parse(dataJson.interestVideo)
                         : null
-                    this.populationData.deviceBrand = dataJson.deviceBrand ? JSON.parse(dataJson.deviceBrand) : null
+                    this.populationData.deviceBrandIds = dataJson.deviceBrandIds ? JSON.parse(dataJson.deviceBrandIds) : null
 
                     this.populationData.age = dataJson.min ? [dataJson.min, dataJson.max] : []
                     this.populationData.agesRange = dataJson.agesRange ? JSON.parse(dataJson.agesRange) : []
@@ -225,9 +225,9 @@ export default {
                             ? dataJson.excludePopulation
                             : []
                     this.populationData.allForm.regionType =
-                        dataJson.region && JSON.parse(dataJson.region).length > 0 ? 'limit' : 'noLimit'
+                        dataJson.regionCategoryIds && JSON.parse(dataJson.regionCategoryIds).length > 0 ? 'limit' : 'noLimit'
 
-                    this.populationData.allForm.region = dataJson.region
+                    this.populationData.allForm.region = dataJson.regionCategoryIds
                     // postAction('/kuaishou/batch/getRegionDetail', {
                     //   regionArr: dataJson.region
                     // }).then(res => {
@@ -240,7 +240,7 @@ export default {
                     this.populationData.allForm.ageType =
                         dataJson.agesRange.length > 0 ? 'ageLimit' : dataJson.min > 0 ? 'ageCustom' : 'noLimit'
                     this.populationData.allForm.device =
-                        dataJson.deviceBrand && eval(dataJson.deviceBrand).length > 0 ? '1' : '0'
+                        dataJson.deviceBrandIds && eval(dataJson.deviceBrandIds).length > 0 ? '1' : '0'
                     this.populationData.allForm.price =
                         dataJson.devicePrice && eval(dataJson.devicePrice).length > 0 ? '1' : '0'
                     this.populationData.allForm.appType =
@@ -253,12 +253,12 @@ export default {
                         dataJson.fansStar && eval(dataJson.fansStar).length > 0 ? '1' : '0'
                     this.populationData.allForm.interestVideo =
                         dataJson.interestVideo && eval(dataJson.interestVideo).length > 0 ? '1' : '0'
-                    this.populationData.allForm.platform_os = dataJson.platformOs
-                    this.populationData.allForm.businessInterestType = dataJson.businessInterestType
-                    this.populationData.allForm.isOpen = dataJson.isOpen
-                    this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
-                    this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
-                    this.populationData.allForm.noAreaBreak = dataJson.noAreaBreak + ''
+                    this.populationData.allForm.platform = +dataJson.platform
+                    // this.populationData.allForm.businessInterestType = dataJson.businessInterestType
+                    this.populationData.allForm.isOpen = JSON.parse(dataJson.isOpen)
+                    this.populationData.allForm.noAgeBreak = JSON.parse(dataJson.noAgeBreak)
+                    this.populationData.allForm.noGenderBreak = JSON.parse(dataJson.noGenderBreak)
+                    this.populationData.allForm.noAreaBreak = JSON.parse(dataJson.noAreaBreak)
                     // this.populationData.allForm.behaviorInterest = dataJson.label && dataJson.label != '[]' ? '1' : '0'
                     this.populationData.allForm.checkArr =
                         this.populationData.allForm.appType == '2' ? JSON.parse(dataJson.appIds) : []
@@ -301,7 +301,7 @@ 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 => {
+                                    postAction('/auto/v3KuaishouAccountAutoTarget/add', params).then(res => {
                                         if (res.success) {
                                             this.visible = false
                                             this.loading = false
@@ -313,7 +313,7 @@ export default {
                                     })
                                 } else if (this.type == 'edit') {
                                     params.id = this.templateId
-                                    postAction('/auto/aiKuaishouAccountAutoTarget/updateLocalTarget', params).then(
+                                    postAction('/auto/v3KuaishouAccountAutoTarget/edit', params).then(
                                         res => {
                                             this.loading = false
                                             if (res.success) {

Разница между файлами не показана из-за своего большого размера
+ 898 - 682
src/views/modules/autoLaunchRevision/createLaunch.vue


+ 1 - 1
vue.config.js

@@ -105,7 +105,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.59:7701', //请求本地 需要jeecg-boot后台项目  赵西安
+        // target: 'http://192.168.1.59:7001', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目