Pārlūkot izejas kodu

合并头条代码

朱鑫波 4 gadi atpakaļ
vecāks
revīzija
f51ae8a08d

+ 7 - 0
src/api/actor.js

@@ -178,6 +178,13 @@ export function fileEditUpdate(parameter) {
     })
 }
 
+export function fileEditUpdateBatch(parameter) {
+    return axios({
+        url: "/ctop/materialInfo/bytedance/batchedit",
+        method: 'put',
+        data: parameter
+    })
+}
 
 export function fileEditAll(parameter) {
     return axios({

+ 2 - 2
src/utils/request.js

@@ -15,9 +15,9 @@ else if (process.env.NODE_ENV == 'debug') {
 } 
 else if (process.env.NODE_ENV == 'production') { 
   
-  // axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot';//预生产
+  axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot';//预生产
   // axios.defaults.baseURL = 'http://139.186.165.84:8806/jeecg-boot';     
-  axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';//生产环境
+  // axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';//生产环境
 }
 const service = axios.create({
 //   baseURL: '/jeecg-boot', // api base_url

+ 3 - 2
src/views/modules/account-config/account-config-server.js

@@ -1,2 +1,3 @@
-export const urlAcount = 'http://118.24.244.213:8080';
-// export const urlAcount = 'http://192.168.1.43:8080';
+export const urlAcount = 'http://118.24.244.213:8080'; // 线上
+// export const urlAcount = 'http://192.168.1.43:8080'; // 子安
+// export const urlAcount = 'http://139.186.165.84:8080'; // 测试

+ 5 - 0
src/views/modules/account-config/components/configuration-modal.less

@@ -32,6 +32,7 @@
             margin-bottom: 15px;
             .select-orientation-content {
                 margin-left: 198px;
+                margin-top: 20px;
                 width: 440px;
                 border: 1px solid #eee;
                 height: 300px;
@@ -208,6 +209,10 @@
                     height: 200px;
                     padding: 10px;
                     border: 1px solid #eee;
+                    .label-content-select-tag {
+                        height: 80%;
+                        overflow: auto;
+                    }
                     .tag-select-class {
                         margin-bottom: 15px;
                     }

+ 161 - 84
src/views/modules/account-config/components/configuration-modal.vue

@@ -21,27 +21,39 @@
                     >
                     </acount-search>
                 </a-form-model-item>
-                <a-form-model-item label="dp链接范围" class="dp-link-start" prop="dpLinkStartIndex">
-                    <a-input-number
-                        class="common-input"
-                        v-model="configForm.dpLinkStartIndex"
-                        :disabled="modalTitle === 'edit'"
-                        :min="1"
-                        placeholder="请输入"
-                        @change="handleDplinkStart"
-                    />
-                    <span>~</span>
-                </a-form-model-item>
-                <a-form-model-item class="dp-link-end" prop="dpLinkEndIndex">
-                    <a-input-number
-                        class="common-input"
-                        v-model="configForm.dpLinkEndIndex"
-                        :disabled="modalTitle === 'edit'"
-                        :min="getEndIndex"
-                        placeholder="请输入"
-                        @change="handleDplinkEnd"
-                    />
+                <a-form-model-item label="dp链接">
+                    <a-radio-group
+                        v-model="configForm.dpLinkIndexUsed"
+                        button-style="solid"
+                        @change="handleDpLinkIndexUsed"
+                    >
+                        <a-radio-button :value="0">关闭</a-radio-button>
+                        <a-radio-button :value="1">开启</a-radio-button>
+                    </a-radio-group>
                 </a-form-model-item>
+                <div v-if="configForm.dpLinkIndexUsed === 1">
+                    <a-form-model-item label="dp链接范围" class="dp-link-start" prop="dpLinkStartIndex">
+                        <a-input-number
+                            class="common-input"
+                            v-model="configForm.dpLinkStartIndex"
+                            :disabled="modalTitle === 'edit'"
+                            :min="1"
+                            placeholder="请输入"
+                            @change="handleDplinkStart"
+                        />
+                        <span>~</span>
+                    </a-form-model-item>
+                    <a-form-model-item class="dp-link-end" prop="dpLinkEndIndex">
+                        <a-input-number
+                            class="common-input"
+                            v-model="configForm.dpLinkEndIndex"
+                            :disabled="modalTitle === 'edit'"
+                            :min="getEndIndex"
+                            placeholder="请输入"
+                            @change="handleDplinkEnd"
+                        />
+                    </a-form-model-item>
+                </div>
                 <a-form-model-item label="预算方式">
                     <a-radio-group
                         v-model="configForm.accountBudgetMode"
@@ -108,7 +120,7 @@
                     </div>
                 </a-form-model-item>
                 <a-form-model-item label="创建数量: 广告组数量" class="campaign-cnt-class" prop="campaignCnt">
-                    <a-input-number v-model="configForm.campaignCnt" :min="1" @change="handleCampaignCnt"/>
+                    <a-input-number v-model="configForm.campaignCnt" :min="1" @change="handleCampaignCnt" :disabled="configForm.dpLinkIndexUsed === 0"/>
                     <a-tooltip placement="top">
                         <template slot="title">
                             <span>输入的数量为每天所创建的广告组数量</span>
@@ -247,6 +259,8 @@
                             <a-checkbox :style="radioStyle" value="INVENTORY_HOTSOON_FEED">抖音火山版</a-checkbox>
                             <a-checkbox :style="radioStyle" value="INVENTORY_AWEME_FEED">抖音短视频</a-checkbox>
                             <a-checkbox :style="radioStyle" value="INVENTORY_UNION_SLOT">穿山甲</a-checkbox>
+                            <a-checkbox :style="radioStyle" value="UNION_BOUTIQUE_GAME">ohayoo精品游戏</a-checkbox>
+                            <a-checkbox :style="radioStyle" value="INVENTORY_TOMATO_NOVEL">番茄小说</a-checkbox>
                         </a-checkbox-group>
                     </div>
                 </div>
@@ -296,25 +310,26 @@
                             </a-radio-group>
                         </a-form-model-item>
                         <a-form-model-item v-if="configForm.customPerson === 'a'" label="定向逻辑">
-                            <a-radio-group v-model="configForm.directionalLogic" button-style="solid" @change="handleDirectionalLogic">
+                            <!-- adRetargetingTagsType -->
+                            <a-radio-group v-model="configForm.adRetargetingTagsType" button-style="solid" @change="handleDirectionalLogic">
                                 <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-group>
                         </a-form-model-item>
-                        <div v-if="configForm.customPerson === 'a' && configForm.directionalLogic === '1'" class="adver-position-radio">
+                        <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '1'" class="adver-position-radio">
                             <div style="width: 60%;">
-                                <directional-logic ref="direct" packtype="directional" multitype="alone" :defaultlist="directionalData" :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
+                                <directional-logic ref="direct" packtype="directional" multitype="alone" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
                             </div>
                         </div>
-                        <div v-if="configForm.customPerson === 'a' && configForm.directionalLogic === '2'" class="adver-position-radio">
+                        <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '2'" class="adver-position-radio">
                             <div style="width: 60%;">
-                                <directional-logic ref="exclude" packtype="exclude" multitype="alone" :defaultlist="directionalData" :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
+                                <directional-logic ref="exclude" packtype="exclude" multitype="alone" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
                             </div>
                         </div>
-                        <div v-if="configForm.customPerson === 'a' && configForm.directionalLogic === '3'" class="adver-position-radio">
+                        <div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '3'" class="adver-position-radio">
                             <div style="width: 60%;">
-                                <directional-logic ref="twoway" packtype="twoway" multitype="all" :defaultlist="directionalData" :updatelistinclude="configForm.updateGetingInclude" :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent" @selection-exclude-event="handleExcludeEvent"></directional-logic>
+                                <directional-logic ref="twoway" packtype="twoway" multitype="all" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistinclude="configForm.updateGetingInclude" :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent" @selection-exclude-event="handleExcludeEvent"></directional-logic>
                             </div>
                         </div>
                         <a-form-model-item label="媒体定向">
@@ -326,12 +341,15 @@
                         </a-form-model-item>
                         <a-form-model-item label="平台">
                             <a-radio-group v-model="configForm.adPlatform" button-style="solid">
-                                <a-radio-button value="NONE" :disabled="!!configForm.adDownloadUrl">不限</a-radio-button>
-                                <a-radio-button value="IOS" :disabled="!!configForm.adDownloadUrl">IOS</a-radio-button>
-                                <a-radio-button value="ANDROID">Andriod</a-radio-button>
-                                <a-radio-button value="PC" :disabled="!!configForm.adDownloadUrl">PC</a-radio-button>
+                                <a-radio-button value="NONE" :disabled="platformLoadingType === 'APP_IOS' || platformLoadingType === 'APP_ANDROID'">不限</a-radio-button>
+                                <a-radio-button value="IOS" :disabled="platformLoadingType === 'APP_ANDROID'">IOS</a-radio-button>
+                                <a-radio-button value="ANDROID" :disabled="platformLoadingType === 'APP_IOS'">Andriod</a-radio-button>
+                                <a-radio-button value="PC" :disabled="platformLoadingType === 'APP_IOS' || platformLoadingType === 'APP_ANDROID'">PC</a-radio-button>
                             </a-radio-group>
                         </a-form-model-item>
+                        <a-form-model-item label="设备类型">
+                            <radio-check v-model="configForm.adDeviceSelectType" :options="deviceTypeList" @change="getAgeSelect"></radio-check>
+                        </a-form-model-item>
                         <a-form-model-item v-if="configForm.adDownloadUrl" label="安卓版本">
                             <a-radio-group v-model="configForm.adAndroidVersion" button-style="solid" @change="handleAndroidVersion">
                                 <a-radio-button value="NONE">不限</a-radio-button>
@@ -386,8 +404,8 @@
                                 class="common-input-long"
                                 v-model="configForm.adAudiencePackageId"
                                 allow-clear
-                                :placeholder="selectOrientPlaceholder"
-                                :disabled="selectOrientPlaceholder !== '请选择已有定向包名称'"
+                                placeholder="请选择已有定向包名称"
+                                :disabled="selectOrientPlaceholder !== 'able'"
                                 @change="handleSelectiveOrientation"
                             >
                                 <a-select-option
@@ -398,6 +416,9 @@
                                     {{ item.name }}
                                 </a-select-option>
                             </a-select>
+                            <span style="margin-left: 20px;">
+                                <a-button :disabled="selectOrientPlaceholder !== 'able'" type="primary" @click="handleAsyncPackage">同步定向包</a-button>
+                            </span>
                             <a-tooltip placement="top">
                                 <template slot="title">
                                     <span>已有定向包只展示当前推广目的和投放范围下,定向功能升级后仍可用的定向包</span>
@@ -405,6 +426,7 @@
                                 <a-icon class="form-itrm-icon orientation-icon" type="smile-o"/>
                             </a-tooltip>
                         </a-form-model-item>
+                        <span v-if="selectOrientPlaceholder !== 'able'" style="color: #f00; margin-left: 198px;">{{ selectOrientPlaceholder }}</span>
                         <div class="select-orientation-content">
                             <p class="orientation-header-title">已选定向信息</p>
                             <div v-if="packageMessageDetail.length" class="orientation-content-substance">
@@ -610,7 +632,6 @@
                         class="avatar-uploader"
                         :show-upload-list="false"
                         :before-upload="beforeUpload"
-                        @change="handleChange"
                     >
                         <div v-if="imageUrl" class="upload-img-class" @mouseover="handleChangeActive">
                             <div class="img-flex-url">
@@ -621,7 +642,7 @@
                                 <a-icon class="delete-icon-class" type="delete" @click.stop="handleDeleteImg"/>
                             </div> -->
                         </div>
-                        <div v-if="!imageUrl && !isCoverImgDiv">
+                        <div v-else>
                             <a-icon type="plus" style="margin-top: 10px;"/>
                             <div class="ant-upload-text">Upload</div>
                         </div>
@@ -825,6 +846,20 @@ export default {
             directionalData: [],
             platformLoadingType: '',
             selectPackageTabs: '1',
+            deviceTypeList: [
+                {
+                    value: 'NONE',
+                    label: '不限'
+                },
+                {
+                    value: 'MOBILE',
+                    label: '智能手机'
+                },
+                {
+                    value: 'PAD',
+                    label: '平板'
+                }
+            ],
             adAcList: [
                 {
                     value: 'NONE',
@@ -894,7 +929,7 @@ export default {
             md5Result: '',
             urlResult: '',
             createOptions: [],
-            adNameTags: ['出价方式', '素材名称', '日期', 'dp链接标识', '创意方式'],
+            adNameTags: ['出价方式', '素材名称', '日期', '创意方式'],
             fieldNames: {
                 label: 'industryName',
                 value: 'industryId',
@@ -1003,7 +1038,8 @@ export default {
                 creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}]
             },
             configForm: {
-                directionalLogic: '1',
+                dpLinkIndexUsed: 0,
+                adRetargetingTagsType: '1',
                 adAudiencePackageId: undefined,
                 adStepBid: 0,
                 ladderOne: '',
@@ -1048,6 +1084,7 @@ export default {
                 customPerson: 'NONE', // 定向-自定义
                 adSuperiorPopularityType: 'NONE', // 定向-媒体定向
                 adPlatform: 'NONE', // 定向-平台
+                adDeviceSelectType: ['NONE'],
                 adSelectAc: ['NONE'],
                 adAc: '', // 定向-网络
                 adHideIfExists: '0', // 定向-已安装用户
@@ -1083,7 +1120,18 @@ export default {
     },
     computed: {
         selectOrientPlaceholder() {
-            return this.configForm.accountId ? '请选择已有定向包名称' : '请选择广告账户';
+            if (!this.configForm.accountId) {
+                return '请选择账户';
+            }
+            else if (this.configForm.adDownloadType === 'DOWNLOAD_URL' && !this.platformLoadingType) {
+                return '请填写投放内容';
+            }
+            else if (this.configForm.adDownloadType === 'EXTERNAL_URL' && !this.configForm.adExternalUrl) {
+                return '请填写投放内容';
+            }
+            else {
+                return 'able';
+            }
         },
         getEndIndex() {
             return Number(this.configForm.dpLinkStartIndex) + 1;
@@ -1115,6 +1163,7 @@ export default {
                     promotionContent: this.configForm.adDownloadType
                 };
                 this.handleGetOptimizationObjective(paramsData);
+                this.handleGetAdAudiencePackage();
             }
         },
         NewAdPackage(newVal, oldVal) {
@@ -1180,6 +1229,23 @@ export default {
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
         moment,
+        handleAsyncPackage() {
+            this.handleGetAdAudiencePackage();
+            this.configForm.adAudiencePackageId = undefined;
+            this.packageMessageDetail = [];
+        },
+        handleDpLinkIndexUsed(e) {
+            const defaultId = e.target.value;
+            if (defaultId === 0) {
+                this.adNameTags.pop();
+                this.configForm.dpLinkStartIndex = 1;
+                this.configForm.dpLinkEndIndex = 2;
+                this.configForm.campaignCnt = 1;
+            }
+            else if (defaultId === 1) {
+                this.adNameTags.push('dp链接标识');
+            }
+        },
         handleDplinkStart(e) {
             this.configForm.dpLinkStartIndex = Math.round(e);
         },
@@ -1195,7 +1261,6 @@ export default {
             };
             getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', paramsData).then(result => {
                 if (result.code === 0) {
-                    console.log(result, 'result--8888888888888888888888888888888-result');
                     result.result.forEach(item => {
                         item.key = item.custom_audience_id;
                     });
@@ -1209,13 +1274,13 @@ export default {
             });
         },
         handleSelectionAloneEvent(list) {
-            if (this.configForm.directionalLogic === '1') {
+            if (this.configForm.adRetargetingTagsType === '1') {
                 this.configForm.updateGetingInclude = list;
                 this.configForm.adRetargetingTagsInclude = list && list.join(',');
                 this.configForm.adRetargetingTagsExclude = '';
                 this.configForm.updateGetingExclude = [];
             }
-            else if (this.configForm.directionalLogic === '2') {
+            else if (this.configForm.adRetargetingTagsType === '2') {
                 this.configForm.updateGetingExclude = list;
                 this.configForm.adRetargetingTagsExclude = list && list.join(',');
                 this.configForm.updateGetingInclude = [];
@@ -1223,10 +1288,12 @@ export default {
             }
         },
         handleDirectEvent(list) {
+            console.log(list, 'list--list--Include');
             this.configForm.updateGetingInclude = list;
             this.configForm.adRetargetingTagsInclude = list && list.join(',');
         },
         handleExcludeEvent(list) {
+            console.log(list, 'list--list--Exclude');
             this.configForm.updateGetingExclude = list;
             this.configForm.adRetargetingTagsExclude = list && list.join(',');
         },
@@ -1235,9 +1302,13 @@ export default {
             this.handleDirectionalList();
             if (selectValue === '1') {
                 this.$refs.exclude.aloneInput = '';
+                this.$refs.twoway.directInput = '';
+                this.$refs.twoway.excludeInput = '';
             }
             else if (selectValue === '2') {
                 this.$refs.direct.aloneInput = '';
+                this.$refs.twoway.directInput = '';
+                this.$refs.twoway.excludeInput = '';
             }
             else if (selectValue === '3') {
                 this.$refs.direct.aloneInput = '';
@@ -1398,9 +1469,12 @@ export default {
                     if (result.code === 0) {
                         this.configForm.adPackage = result.result.package || '';
                         this.platformLoadingType = result.result.platform || '';
-                        // if (result.result.platform === '') {
-
-                        // }
+                        if (result.result.platform && result.result.platform === 'APP_ANDROID') {
+                            this.configForm.adPlatform = 'ANDROID';
+                        }
+                        else if (result.result.platform && result.result.platform === 'APP_IOS') {
+                            this.configForm.adPlatform = 'IOS';
+                        }
                     }
                     else {
                         this.$message.error(result.message);
@@ -1442,21 +1516,18 @@ export default {
         },
         handleAdDownLoadType(e) {
             this.optimizationOption = [];
-            if (e.target.value === 'DOWNLOAD_URL') {
-                this.configForm.adExternalUrl = undefined;
-                this.configForm.adOpenUrl = undefined;
-                this.configForm.adConvertId = undefined;
-                this.$refs['ruleForm'].clearValidate(['adDownloadUrl']);
-                this.$refs['ruleForm'].clearValidate(['adPackage']);
-            }
-            else if (e.target.value === 'EXTERNAL_URL') {
-                console.log(this.configForm.adDownloadUrl, this.configForm.adPackage, '[][][][][][][]]][]][][]]][]');
-                this.configForm.adExternalUrl = undefined;
-                this.configForm.adDownloadUrl = undefined;
-                this.configForm.adPackage = undefined;
-                this.configForm.adConvertId = undefined;
-                this.configForm.adOpenUrl = undefined;
-                this.$refs['ruleForm'].clearValidate(['adExternalUrl']);
+            const defaultValue = e.target.value;
+            if (defaultValue === 'DOWNLOAD_URL') {
+                this.configForm.adExternalUrl = '';
+                this.configForm.adOpenUrl = '';
+                this.$refs.ruleForm.clearValidate(['adExternalUrl']);
+            }
+            else if (defaultValue === 'EXTERNAL_URL') {
+                this.configForm.adDownloadUrl = '';
+                this.configForm.adPackage = '';
+                this.configForm.adConvertId = '';
+                this.$refs.ruleForm.clearValidate(['adDownloadUrl']);
+                this.$refs.ruleForm.clearValidate(['adPackage']);
             }
         },
         handleCampaignCnt(e) {
@@ -1515,6 +1586,7 @@ export default {
                         this.configForm.campaignLandingType = detailData.campaignLandingType;
                         this.configForm.advertisingType = detailData.advertisingType || '1';
                         this.configForm.campaignName = detailData.campaignName || '';
+                        this.configForm.dpLinkIndexUsed = detailData.dpLinkIndexUsed;
                         this.configForm.adName = detailData.adName || '';
                         this.configForm.campaignCnt = detailData.campaignCnt || '';
                         this.configForm.campaignAdCnt = detailData.campaignAdCnt || '';
@@ -1532,36 +1604,32 @@ export default {
                         }, 200);
                         getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getDMPCustomAudience', {accountId: detailData.accountId}).then(result => {
                             if (result.code === 0) {
-                                console.log(result, 'result--8888888888888888888888888888888-result');
                                 result.result.forEach(item => {
                                     item.key = item.custom_audience_id;
                                 });
                                 this.directionalData = result.result;
-                                if (detailData.adRetargetingTagsInclude && detailData.adRetargetingTagsExclude) {
+                                this.configForm.adRetargetingTagsType = detailData.adRetargetingTagsType || '1';
+                                if (detailData.adRetargetingTagsType === '3') {
                                     this.configForm.customPerson = 'a';
-                                    this.configForm.directionalLogic = '3';
                                     this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
                                     this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
+                                    this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude ? detailData.adRetargetingTagsExclude.split(',').map(item => Number(item)) : [];
+                                    this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude ? detailData.adRetargetingTagsInclude.split(',').map(item => Number(item)) : [];
+                                }
+                                else if (detailData.adRetargetingTagsType === '2') {
+                                    this.configForm.customPerson = 'a';
+                                    this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
                                     this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude.split(',').map(item => Number(item));
-                                    this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude.split(',').map(item => Number(item));
+                                    this.configForm.updateGetingInclude = [];
                                 }
-                                else if (detailData.adRetargetingTagsInclude && !detailData.adRetargetingTagsExclude) {
+                                else if (detailData.adRetargetingTagsType === '1') {
                                     this.configForm.customPerson = 'a';
-                                    this.configForm.directionalLogic = '1';
                                     this.configForm.adRetargetingTagsInclude = detailData.adRetargetingTagsInclude;
                                     this.configForm.updateGetingExclude = [];
                                     this.configForm.updateGetingInclude = detailData.adRetargetingTagsInclude.split(',').map(item => Number(item));
                                 }
-                                else if (!detailData.adRetargetingTagsInclude && detailData.adRetargetingTagsExclude) {
-                                    this.configForm.customPerson = 'a';
-                                    this.configForm.directionalLogic = '2';
-                                    this.configForm.adRetargetingTagsExclude = detailData.adRetargetingTagsExclude;
-                                    this.configForm.updateGetingExclude = detailData.adRetargetingTagsExclude.split(',').map(item => Number(item));
-                                    this.configForm.updateGetingInclude = [];
-                                }
                                 else {
                                     this.configForm.customPerson = 'NONE';
-                                    this.configForm.directionalLogic = '1';
                                     this.configForm.adRetargetingTagsExclude = '';
                                     this.configForm.updateGetingExclude = '';
                                     this.configForm.updateGetingInclude = [];
@@ -1578,6 +1646,7 @@ export default {
                         this.configForm.adLocationType = detailData.adLocationType;
                         this.configForm.adSelectAge = detailData.adAge.split(',');
                         this.configForm.adSelectAc = detailData.adAc.split(',');
+                        this.configForm.adDeviceSelectType = detailData.adDeviceType.split(',');
                         this.configForm.adSuperiorPopularityType = detailData.adSuperiorPopularityType;
                         this.configForm.adPlatform = detailData.adPlatform;
                         this.configForm.adAc = detailData.adAc;
@@ -1611,6 +1680,7 @@ export default {
                         this.imageUrl = detailData.imageUrl;
                         this.urlResult = detailData.imageUrl;
                         this.md5Result = detailData.creativeProductImageCode;
+                        this.handleGetPackage();
                         if (detailData.adAndroidOsv !== 'NONE') {
                             this.configForm.adAndroidVersion = 'a';
                             this.configForm.androidChangeValue = detailData.adAndroidOsv;
@@ -1809,7 +1879,6 @@ export default {
             });
         },
         handleDownloadLink(e) {
-            this.configForm.adPlatform = e.target.value ? 'ANDROID' : 'NONE';
             this.handleGetPackage();
         },
         handleDeleteImg() {
@@ -1832,10 +1901,16 @@ export default {
             const fileOvesize = info.size > (1024 * 1024);
             if (!isZip) {
                 this.$message.error('请上传正确类型的图片');
+                this.imageUrl = '';
+                this.urlResult = '';
+                this.md5Result = '';
                 return;
             }
             if (fileOvesize) {
                 this.$message.error('图片大小不能超过1M');
+                this.imageUrl = '';
+                this.urlResult = '';
+                this.md5Result = '';
                 return;
             }
             new Promise(function (resolve, reject) {
@@ -1850,16 +1925,17 @@ export default {
                 img.src = _URL.createObjectURL(info);
             }).then(() => {
                 this.handleMd5(info);
+                this.getBase64(info, imageUrl => {
+                    this.imageUrl = imageUrl;
+                });
             }, () => {
                 this.$message.error('图片尺寸必须是108*108!');
+                this.imageUrl = '';
+                this.urlResult = '';
+                this.md5Result = '';
                 return Promise.reject();
             });
         },
-        handleChange(info) {
-            this.getBase64(info.file.originFileObj, imageUrl => {
-                this.imageUrl = imageUrl;
-            });
-        },
         cosUpload(file) {
             let that = this;
             let date = new Date();
@@ -1938,6 +2014,10 @@ export default {
                     return;
                 }
             }
+            if (this.selectPackageTabs === '2' && !this.configForm.adAudiencePackageId) {
+                this.$message.error('请选择已有定向包');
+                return;
+            }
             if (this.configForm.adScheduleType === 'SCHEDULE_START_END' && !this.configForm.launchDateRange.length) {
                 this.$message.error('请选择投放时间');
                 return;
@@ -2007,6 +2087,7 @@ export default {
             paramsFormData.adCity = paramsFormData.adSelectCity.join(',');
             paramsFormData.adAge = paramsFormData.adSelectAge.join(',');
             paramsFormData.adAc = paramsFormData.adSelectAc.join(',');
+            paramsFormData.adDeviceType = paramsFormData.adDeviceSelectType.join(',');
             paramsFormData.productSellingPoints = this.configForm.defaultFormList && this.configForm.defaultFormList.map(item => item.value);
             paramsFormData.creativeThirdIndustryId = paramsFormData.creativeThirdIndustryIds[2];
             paramsFormData.creativeProductImageCode = this.md5Result;
@@ -2059,10 +2140,6 @@ export default {
                 }
             }
             this.configForm.creativeLabel = [];
-            if (this.creativeTag.length > 20) {
-                this.creativeTag = this.creativeTag.slice(0, 20);
-                this.$message.error('最多创建20个');
-            }
         },
         handleTagsClose(removedTag) {
             const tags = this.creativeTag.filter(tag => tag !== removedTag);

+ 53 - 26
src/views/modules/account-config/components/directional-logic/directional-logic.vue

@@ -4,7 +4,7 @@
             <div class="select-class-left">
                 <a-tabs v-model="selectPackageTabs" @change="handleTabsChange">
                     <a-tab-pane key="1" tab="定向池">
-                        <a-input-search class="input-search" v-model="directInput" placeholder="请输入账户名或ID" @change="handleSearchPack($event, 'all', 'direct')" />
+                        <a-input-search class="input-search" v-model="directInput" placeholder="请输入人群包名称" @change="handleSearchPack($event, 'all', 'direct')" />
                         <a-table
                             :columns="columns"
                             :data-source="tableDataAllDirect"
@@ -18,7 +18,7 @@
                         </a-table>
                     </a-tab-pane>
                     <a-tab-pane key="2" tab="排除池">
-                        <a-input-search class="input-search" v-model="excludeInput" placeholder="请输入账户名或ID" @change="handleSearchPack($event, 'all', 'exclude')" />
+                        <a-input-search class="input-search" v-model="excludeInput" placeholder="请输入人群包名称" @change="handleSearchPack($event, 'all', 'exclude')" />
                         <a-table
                             :columns="columns"
                             :data-source="tableDataAllExclude"
@@ -82,7 +82,7 @@
             </div>
         </div>
         <div v-else>
-            <a-input-search class="input-search" v-model="aloneInput" placeholder="请输入账户名或ID" @change="handleSearchPack($event, 'alone')" />
+            <a-input-search class="input-search" v-model="aloneInput" placeholder="请输入人群包名称" @change="handleSearchPack($event, 'alone')" />
             <div class="tree-select-class">
                 <div class="select-class-left">
                     <a-table
@@ -133,6 +133,10 @@ export default {
             type: String,
             default: ''
         },
+        valueids: {
+            type: String,
+            default: ''
+        },
         defaultlist: {
             type: Array,
             default: () => {
@@ -255,6 +259,7 @@ export default {
                     console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
                     this.tableSelectDirectIds = selectedRows && selectedRows.map(item => item.key);
                     this.tableSelectDirectData = selectedRows;
+                    this.$emit('selection-direct-event', this.tableSelectDirectIds);
                 },
                 selectedRowKeys: this.tableSelectDirectIds,
                 getCheckboxProps: record => ({
@@ -272,6 +277,7 @@ export default {
                     console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
                     this.tableSelectExcludeIds = selectedRows && selectedRows.map(item => item.key);
                     this.tableSelectExcludeData = selectedRows;
+                    this.$emit('selection-exclude-event', this.tableSelectExcludeIds);
                 },
                 selectedRowKeys: this.tableSelectExcludeIds,
                 getCheckboxProps: record => ({
@@ -338,29 +344,52 @@ export default {
         this.updateTableAllExclude = this.defaultlist;
         this.tableDataAlone = this.defaultlist;
         this.updateTreeDataAlone = this.defaultlist;
-        
-        console.log(this.updateTableAllDirect, 'this.updateTableAllDirect');
-        console.log(this.updatelistinclude, this.updatelistexclude, '--00--00--00--0--555555');
-        if (this.updatelistinclude.length && this.updatelistexclude.length) {
-            this.tableSelectDirectIds = [...this.updatelistinclude];
-            this.tableSelectExcludeIds = [...this.updatelistexclude];
-            this.updateTableAllDirect.forEach(item => {
-                this.updatelistinclude.forEach(val => {
-                    if (item.key === val) {
-                        this.tableSelectDirectData.push(item);
-                    }
+
+        if (this.valueids === '3') {
+            if (this.updatelistinclude.length && this.updatelistexclude.length) {
+                this.tableSelectDirectIds = [...this.updatelistinclude];
+                this.tableSelectExcludeIds = [...this.updatelistexclude];
+                this.updateTableAllDirect.forEach(item => {
+                    this.updatelistinclude.forEach(val => {
+                        if (item.key === val) {
+                            this.tableSelectDirectData.push(item);
+                        }
+                    });
                 });
-            });
-            this.updateTableAllExclude.forEach(item => {
-                this.updatelistexclude.forEach(val => {
-                    if (item.key === val) {
-                        this.tableSelectExcludeData.push(item);
-                    }
+                this.updateTableAllExclude.forEach(item => {
+                    this.updatelistexclude.forEach(val => {
+                        if (item.key === val) {
+                            this.tableSelectExcludeData.push(item);
+                        }
+                    });
                 });
-            });
+            }
+            else if (this.updatelistexclude.length && !this.updatelistinclude.length) {
+                this.tableSelectExcludeIds = [...this.updatelistexclude];
+                this.selectPackageTabs = '2';
+                this.selectAllRightTabs = '4';
+                this.updateTableAllExclude.forEach(item => {
+                    this.updatelistexclude.forEach(val => {
+                        if (item.key === val) {
+                            this.tableSelectExcludeData.push(item);
+                        }
+                    });
+                });
+            }
+            else if (!this.updatelistexclude.length && this.updatelistinclude.length) {
+                this.tableSelectDirectIds = [...this.updatelistinclude];
+                this.selectPackageTabs = '1';
+                this.selectAllRightTabs = '3';
+                this.updateTableAllDirect.forEach(item => {
+                    this.updatelistinclude.forEach(val => {
+                        if (item.key === val) {
+                            this.tableSelectDirectData.push(item);
+                        }
+                    });
+                });
+            }
         }
-        else if (this.updatelistinclude.length && !this.updatelistexclude.length) {
-            console.log(11111);
+        else if (this.valueids === '1') {
             this.tableSelectIds = [...this.updatelistinclude];
             this.updateTableAllDirect.forEach(item => {
                 this.updatelistinclude.forEach(val => {
@@ -370,8 +399,7 @@ export default {
                 });
             });
         }
-        else if (!this.updatelistinclude.length && this.updatelistexclude.length) {
-            console.log(222222);
+        else if (this.valueids === '2') {
             this.tableSelectIds = [...this.updatelistexclude];
             this.updateTableAllDirect.forEach(item => {
                 this.updatelistexclude.forEach(val => {
@@ -380,7 +408,6 @@ export default {
                     }
                 });
             });
-            console.log(this.selectRightData, 'this.selectRightData--this.selectRightData');
         }
     },
     methods: {

+ 3 - 2
src/views/modules/creative-copywrit/creative-copywrit.less

@@ -9,12 +9,13 @@
     .acount-title {
         display: flex;
         font-size: 14px;
-        height: 40px;
-        line-height: 40px;
         .acount-title-left {
             margin-right: 20px;
             width: 100px;
         }
+        .only-title-mater {
+            height: 35px;
+        }
         .examin-form-model {
             width: 500px;
             position: relative;

+ 158 - 7
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -394,12 +394,15 @@
             >
                 一键同步
             </a-button>
+            <!-- &&  -->
+            <a-button v-if="checkArr.length && active !== '0'" type="primary" @click="handleFodderWind">素材下线</a-button>
+            <a-button v-if="checkArr.length && active === '0'" type="primary" @click="handleApprovedClick">通过审核</a-button>
         </div>
         <a-tabs @change="callbackTwo" v-model="active" type="card" id="material-card">
             <a-tab-pane :tab="item.tab" v-for="item of examinelList" :key="item.value">
                 <a-spin :spinning="spinning">
                     <div v-if="dataSource.length > 0">
-                        <a-checkbox-group @change="onChangeCheck" v-model="checkArr" class="home-card">
+                        <a-checkbox-group @change="onChangeCheck($event, item)" v-model="checkArr" class="home-card">
                         <div class="home-item" v-for="(items, index) in dataSource" :key="index" @click="showDetail(items)">
                             <span v-if="items.excellent == 0"></span>
                             <span
@@ -600,7 +603,7 @@
                                         </a-menu-item>
                                     </a-menu>
                                 </a-dropdown>
-                                <a-checkbox :value="items.id" style="float: right" v-show="active == '1'"></a-checkbox>
+                                <a-checkbox :value="items.id" style="float: right" v-show="active == '0' || active == '1'"></a-checkbox>
                                 <br />
                                 {{ items.createTime | getDate }}
                             </span>
@@ -1465,7 +1468,9 @@
             <div>
                 <div class="acount-title">
                     <div class="acount-title-left">素材名称</div>
-                    <div class="acount-title-right">{{ currentPageOnlyList.materialName }}</div>
+                    <div class="acount-title-right">
+                        <div class="only-title-mater">{{ currentPageOnlyList.materialName }}</div>
+                    </div>
                 </div>
                 <div class="acount-title push-plate">
                     <div class="acount-title-left">创意标题</div>
@@ -1506,7 +1511,64 @@
                     </div>
                 </div>
             </div>
-        </a-modal>  
+        </a-modal>
+        <a-modal
+            v-if="batchVisible"
+            title="审核通过"
+            dialog-class="examin-modal"
+            :visible="batchVisible"
+            @ok="handleBatchSure"
+            @cancel="handleBatchCancel"
+        >
+            <div>
+                <div class="acount-title">
+                    <div class="acount-title-left">素材名称</div>
+                    <div class="acount-title-right">
+                        <div class="only-title-mater" v-for="item in modalShowBatchList" :key="item.id">
+                            {{ item.materialName }}
+                        </div>
+                    </div>
+                </div>
+                <div class="acount-title push-plate">
+                    <div class="acount-title-left">创意标题</div>
+                    <div class="acount-title-right">
+                        <a-button type="primary" @click="handleAddOrigin"><a-icon type="plus" />创意标题</a-button>
+                        <a-button class="examin-select-title" @click="handleSelectTitle">选标题</a-button>
+                        <span>已填:{{ titleFiledResult.length || 0 }}</span>
+                    </div>
+                </div>
+                <div class="acount-title">
+                    <div class="acount-title-left"></div>
+                    <div class="acount-title-right">
+                        <a-form :form="examinForm">
+                            <a-form-item
+                                v-for="item in defaultFormList"
+                                :key="item.id"
+                                class="examin-form-model"
+                                :label-col="labelCol"
+                                :wrapper-col="wrapperCol"
+                                label=""
+                            >
+                                <a-input
+                                    v-decorator="[
+                                        item.name,
+                                        { rules: [
+                                            {required: true, message: '请输入创意标题'},
+                                            {min: 5, max: 30, message: '创意标题5-30个字'}
+                                        ]}
+                                    ]"
+                                    class="examin-form-input"
+                                    placeholder="请输入"
+                                    @change="handleFormInputChang($event, item)"
+                                />
+                                <span class="examin-form-num">{{ handleFilterName(item.name) }}/30</span>
+                                <a-icon class="examin-form-icon" type="delete" @click="handleDelOrigin(item)"/>
+                            </a-form-item>
+                        </a-form>
+                    </div>
+                </div>
+            </div>
+        </a-modal>
     </a-card>
 </template>
 <script>
@@ -1515,12 +1577,13 @@ import {JeecgListMixin} from '@/mixins/JeecgListMixin';
 import JEllipsis from '@/components/jeecg/JEllipsis';
 import UploadToAli from '@femessage/upload-to-ali';
 import selectTable from '@/views/modules/Statistics/components/selectPagination.vue';
-import {fileCheck, fileEdit, fileEditAll, fileInsertV2, fileEditUpdate} from '@/api/actor';
+import {fileCheck, fileEdit, fileEditAll, fileInsertV2, fileEditUpdate, fileEditUpdateBatch} from '@/api/actor';
 import {deleteAction, getAction, postAction, putAction} from '@/api/manage';
 import uploadFile from '@/components/uploadFile.vue';
 import {closeAllVideoFun, stopOtherVideo} from '@/utils/videoControl';
 import accountCheck from '@/views/modules/material/accountCheck';
 import accountCheckBytedance from '@/views/modules/material/accountCheckBytedance';
+import {urlAcount} from '../account-config/account-config-server.js';
 
 import qs from 'qs';
 import {mapGetters} from 'vuex';
@@ -1540,6 +1603,8 @@ export default {
     },
     data() {
         return {
+            batchVisible: false,
+            showTabsTitle: '',
             taobaoSpecialOfferTitle: 'taobao',
             defaultSolganStatus: 'input',
             defaultSolganTitle: 'test',
@@ -1722,7 +1787,8 @@ export default {
             bohuiShow: false,
             waterLoading: false,
             videoTag: [],
-            videoVisibleChange: ''
+            videoVisibleChange: '',
+            modalShowBatchList: []
         };
     },
     filters: {
@@ -1861,6 +1927,85 @@ export default {
     },
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
+        handleApprovedClick() {
+            const batchList = [];
+            this.defaultFormList = [];
+            this.dataSource.forEach(item => {
+                if (this.checkArr.includes(item.id)) {
+                    batchList.push(item);
+                }
+            });
+            console.log(batchList, 'batchList');
+            this.modalShowBatchList = batchList;
+            this.batchVisible = true;
+            for (let i = 0; i < 3; i++) {
+                const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
+                this.defaultFormList.push({
+                    id: randomNum,
+                    name: 'username' + randomNum,
+                    value: ''
+                });
+            }
+        },
+        handleBatchSure() {
+            if (this.defaultFormList && this.defaultFormList.length < 3) {
+                this.$message.error('请至少输入3条标题');
+                return;
+            }
+            let params = {
+                ids: this.modalShowBatchList.map(item => item.id) || [],
+                auditorId: this.userInfo().id,
+                status: 1,
+                slogans: this.defaultFormList.map(item => item.value) || []
+            };
+            this.examinForm.validateFields(err => {
+                if (!err) {
+                    fileEditUpdateBatch(params).then(res => {
+                        if (res.code === 200) {
+                            this.refuseReason = '';
+                            this.batchVisible = false;
+                            this.defaultFormList = [];
+                            this.$message.success('审核成功');
+                            this.loadData();
+                        }
+                        
+                    });
+                }
+            });
+        },
+        handleBatchCancel() {
+            console.log('批量取消按钮');
+            this.batchVisible = false;
+        },
+        handleFodderWind() {
+            if (this.checkArr.length > 8) {
+                this.$message.error('最多可以支持同时选择8个视频');
+                return;
+            }
+            const paramsData = {
+                offlineFlag: 1,
+                id: this.checkArr.join(',')
+            };
+            let that = this;
+            this.$confirm({
+                title: '下线提示',
+                content: '是否下线选中视频',
+                onOk() {
+                    getAction(urlAcount + '/bytedance-api/advertiser/materialInfoController/updMaterialOfflineById', paramsData).then(result => {
+                        if (result.code === 0) {
+                            that.searchQuery();
+                            that.checkArr = [];
+                            that.$message.success(result.message);
+                        }
+                        else {
+                            that.$message.error(result.message);
+                        }
+                    }).catch(error => {
+                        console.log(error, 'eeee');
+                    });
+                }
+            });
+        },
         compareToFirstPassword(rule, value, callback) {
             if (value && value.length > 30 || value.length < 5) {
                 callback('创意标题5-30个字');
@@ -2038,6 +2183,7 @@ export default {
             this.defaultFormList = formData.filter(item => list.id !== item.id);
         },
         handleExamin(data) {
+            this.defaultFormList = [];
             getAction('/ctop/materialInfo/queryById', {
                 id: data.id
             }).then(res => {
@@ -2442,7 +2588,12 @@ export default {
                 this.checkAllImage = false;
             }
         },
-        onChangeCheck(checkedList) {
+        onChangeCheck(checkedList, data) {
+            console.log(data, 'data--data');
+            console.log(checkedList, this.checkArr, this.dataSource, '-------');
+            if (data.value === '0') {
+                this.showTabsTitle = '0';
+            }
             if (checkedList.length === 0) {
                 this.checkAll = false;
             }

+ 1 - 1
vue.config.js

@@ -87,8 +87,8 @@ module.exports = {
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
         // target:'http://118.24.244.213:8804',
         // target: 'http://192.168.1.43:8080', // 子安
+        // target: 'http://192.168.1.8:8806', // 学超
       //  target:'http://139.186.165.84:8806', //测试
-        // target:'http://apipre.tjyourong.com.cn', //预生产
 
         ws: false,